/***********************************************
* Link Floatie script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var floattext=new Array()

floattext[1]='Some other floatie text'

var floatiewidth="170px" //default width of floatie in px
var floatieheight="60px" //default height of floatie in px. Set to "" to let floatie content dictate height.
var fadespeed=90 //speed of fade (5 or above). Smaller=faster.

var baseopacity=0
function slowhigh(which2){
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",fadespeed)
}

function instantset(degree){
cleartimer()
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function paramexists(what){
return(typeof what!="undefined" && what!="")
}

function showfloatie(thetext, e, optbgColor, optWidth, optHeight){
var dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft;
var dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop;
var floatobj=document.getElementById("dhtmlfloatie")
floatobj.style.left="-900px"
floatobj.style.display="block"
floatobj.style.width=paramexists(optWidth)? optWidth+"px" : floatiewidth
floatobj.style.height=paramexists(optHeight)? optHeight+"px" : floatieheight!=""? floatieheight : ""
floatobj.innerHTML=thetext
var floatWidth=floatobj.offsetWidth>0? floatobj.offsetWidth : floatobj.style.width
var floatHeight=floatobj.offsetHeight>0? floatobj.offsetHeight : floatobj.style.width
var winWidth=document.all&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winHeight=document.all&&!window.opera? ietruebody().clientHeight : window.innerHeight
e=window.event? window.event : e
floatobj.style.left=dsocx+5+"px"
if (e.clientX>winWidth-floatWidth && e.clientY+20>winHeight-floatHeight)
floatobj.style.top=dsocy+50+"px"
else
floatobj.style.top=dsocy+50+"px"
slowhigh(floatobj)
}

function hidefloatie(){
var floatobj=document.getElementById("dhtmlfloatie")
floatobj.style.display="none"
}


// formStyle.js, produced by Philip Howard, GamingHeadlines.co.uk

	function toggleRadiobox(rbObj,rbKey,rbGroup,rbId)
	{
	if (rbKey==0||rbKey==32){
	var inputFields = document.getElementsByTagName("a");
		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
			{
				if (inputFields[inputIndex].getAttribute("name")==rbGroup){
					
					if(inputFields[inputIndex].className.indexOf("RadioboxChecked")<0)
									{var RadioBoxType = inputFields[inputIndex].className.replace("Radiobox","");}
									else
									{var RadioBoxType = inputFields[inputIndex].className.replace("RadioboxChecked","");}
									
					inputFields[inputIndex].className="Radiobox"+RadioBoxType;
					}
			}
	var inputFields = document.getElementsByTagName("input");
		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
			{
				if (inputFields[inputIndex].getAttribute("name")==rbGroup)
					{
						if (inputFields[inputIndex].getAttribute("id")==rbId)
							{
								if(rbObj.className.indexOf("RadioboxChecked")<0)
									{var RadioBoxType = rbObj.className.replace("Radiobox","");}
									else
									{var RadioBoxType = rbObj.className.replace("RadioboxChecked","");}

								inputFields[inputIndex].checked = true;rbObj.className="RadioboxChecked"+RadioBoxType;}
							else
							{inputFields[inputIndex].checked = false;}
					}
			}
	return false;
	}
	}
	
	function InitialiseRadioboxes()
	{
		var inputFields = document.getElementsByTagName("span");
		var radioboxIndex = 0;
		
		for (var inputIndex=0;inputIndex<inputFields.length;inputIndex++)
			{
				if (inputFields[inputIndex].className=="rbStyled")
					{
						var styleType = "";
						if (inputFields[inputIndex].getAttribute("name")!=null){styleType=inputFields[inputIndex].getAttribute("name");}
						
						var inputCurrent = inputFields[inputIndex].getElementsByTagName("input").item(0);
						if(inputCurrent.getAttribute("type")=="radio")
						{
							//inputCurrent.setAttribute("class","InputHidden");
							inputCurrent.className = "InputHidden";
							inputCurrent.setAttribute("id","StyledRadiobox"+radioboxIndex);
							
							if(navigator.appName.indexOf("Internet Explorer")>0)
							{
								//Internet Explorer
								var inputHTML = inputFields[inputIndex].innerHTML;
								var styledHTML = "<a"//href=\"#\""
								styledHTML+=" tabindex=\"1"+inputIndex+"\"";
								
								styledHTML+=" name=\""+inputCurrent.getAttribute("name")+"\""
								
								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledHTML+=" title=\""+inputCurrent.getAttribute("title")+"\"";}}
								
								if (inputCurrent.checked)
									{styledHTML+=" class=\"RadioboxChecked"+styleType+"\""}
									else
									{styledHTML+=" class=\"Radiobox"+styleType+"\""}
									
								styledHTML+=" onClick=\"toggleRadiobox(this,'','"+inputCurrent.getAttribute("name")+"','StyledRadiobox"+radioboxIndex+"');return false;\""
								styledHTML+=" onKeyPress=\"return toggleRadiobox(this,event.keyCode,'"+inputCurrent.getAttribute("name")+"','StyledRadiobox"+radioboxIndex+"');\""
								
								styledHTML+="></a>"
								
								inputFields[inputIndex].innerHTML = inputHTML+styledHTML;
								inputFields[inputIndex].className = "Radiobox"+styleType;
							}
							else
							{
								//Firefox, Opera, Netscape
								var styledRadiobox = document.createElement("a"); 
								styledRadiobox.setAttribute("href","#");
								styledRadiobox.setAttribute("name",inputCurrent.getAttribute("name"));
								
								if(inputCurrent.hasAttribute){if(inputCurrent.hasAttribute("title")){styledRadiobox.setAttribute("title",inputCurrent.getAttribute("title"));}}
								
								styledRadiobox.setAttribute("onClick","toggleRadiobox(this,'','"+inputCurrent.getAttribute("name")+"','StyledRadiobox"+radioboxIndex+"');return false;");
								styledRadiobox.setAttribute("onKeyPress","return toggleRadiobox(this,event.keyCode,'"+inputCurrent.getAttribute("name")+"','StyledRadiobox"+radioboxIndex+"');");
								
								if (inputCurrent.checked)
									{styledRadiobox.className="RadioboxChecked"+styleType;}
									else
									{styledRadiobox.className="Radiobox"+styleType;}
								
								inputFields[inputIndex].appendChild(styledRadiobox);
							}
							
							radioboxIndex++;
						}
					}
			}	
	}
	
	function checkImages() {
	  if (document.getElementById) {
		var x = document.getElementById('formStyleTestImage').offsetWidth;
		if (x == '1'||x == '7') {
			document.getElementById('formStyleTestImage').style.display='none';
			return true;
		}else{
			return false;
		}
	  }
	}
	



	
	function Initialise()
		{
			if(checkImages()){InitialiseRadioboxes();}
		}
