// HRB main js
// Simon Davies

var fcfc='';
var fcsc='';
var scfc='';
var scsc='';
var tcfc='';
var tcsc='';

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
};

function conf(message, url){
if(confirm(message)) location.href = url;
};

function joinform(hide,show){
document.getElementById(hide).className = "hidecontent";
document.getElementById(show).className = "showcontent";
};

function radioclick(fc,sc,tc){
if (fc=='fc' && fcfc && fcsc){document.getElementById(fcfc).disabled=false;document.getElementById(fcsc).disabled=false;}
if (fc=='sc' && scfc && scsc){document.getElementById(scfc).disabled=false;document.getElementById(scsc).disabled=false;}
if (fc=='tc' && tcfc && tcsc){document.getElementById(tcfc).disabled=false;document.getElementById(tcsc).disabled=false;}

document.getElementById(sc).disabled=true;
document.getElementById(tc).disabled=true;

if (fc=='fc'){fcfc=sc;fcsc=tc;}
if (fc=='sc'){scfc=sc;scsc=tc;}
if (fc=='tc'){tcfc=sc;tcsc=tc;}

if (fcfc && scfc && tcfc){
link= "<a class='join' href=javascript:joinform('sc5','sc6')>Continue To Part 6</a>";
document.getElementById('contop6').innerHTML=link;
}

};

function showcontent(id){
document.getElementById(id).className='showcontent';
};

function hidecontent(id){
document.getElementById(id).className='hidecontent';
};

function newWindow(mypage,myname,w,h,features){
if(screen.width){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
}else{winl = 0;wint =0;}
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
};

function keyupdown(obj){
var text=obj.value;
var idv=obj.id;

if (idv=='validator'){var e = document.getElementById('form');e.send.disabled=false}

if (text=='Your Name'){document.getElementById(idv).value='';}
if (text=='Email Address'){document.getElementById(idv).value='';}
if (text=='Your Comment'){document.getElementById(idv).value='';}

};

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
};



