//All client-side functionality for the BDD site


//Resize Cards on page to fit current dimensions
function ResizePage()
{
	//Reset Cards to minimum size 
	document.getElementById("CardLeft").childNodes[0].height = 100;
	document.getElementById("CardCenter").childNodes[0].height = 100;
	document.getElementById("CardRight").childNodes[0].height = 100;

	//Find the Width and Height of the CardContainer
	//Cards need to fill 75% of vertical space
	var Vertical = document.getElementById("CardContainer").clientHeight;
	var CardHeight = parseFloat(Vertical * .75);
	
	//Assign correct height to cards
	document.getElementById("CardLeft").childNodes[0].height = CardHeight;
	document.getElementById("CardCenter").childNodes[0].height = CardHeight;
	document.getElementById("CardRight").childNodes[0].height = CardHeight;

}
	

//Call the KP web service
function KPStart()
{	
	/*
	//Hidden frame for calling KPasmx
	var IFrame = document.createElement("<iFrame name='KP'></iFrame>");
	
	//Set the properties of the IFrame element
	with (IFrame){			
		id = "KP";
		src = "http://keenaipro.com/keenaiprows.asmx";
		style.position = "absolute";
		style.left = "0";
		style.top = "0";
		style.width = "0";
		style.height = "0";		
	}
	
	//Append the Iframe element to the body
	document.body.appendChild(IFrame);	
	*/
}

if(window.navigator.appName=="Netscape")
{
	document.addEventListener("DOMContentLoaded", Visible, false);
}
else
{
	document.onreadystatechange=Visible;
}


//Make the body visible
function Visible()
{
	if(window.navigator.appName=="Netscape")
	{
		//
		window.setTimeout("document.getElementById('PreLoader').innerHTML = '';",10);
		window.setTimeout("document.getElementById('TableMain').style.visibility='visible'",10);
	}
	else if (document.readyState == "complete")
	{
		document.getElementById("PreLoader").removeNode(true);
		window.setTimeout("document.getElementById('TableMain').style.visibility='visible'",1);
	}
}


