function applyCustomSettings(what)
{
	var mandatoryControlbgColor = "#5B95C4";
	var ControlbgColor = "white";
	var pageBackColor = "#356893";
	var textColor = "#003466";
	var inputs="";
	var i=0;
	var j=0;
	var buttonBackgroundColor = "white";
	var buttonBorderColor = "white";
	var cntrlArray = new Array();
	cntrlArray[0] = "input";
	cntrlArray[1] = "select";
	cntrlArray[2] = "td";
	cntrlArray[3] = "font";
	
	
	if(what == 1)
	{
		document.body.background = ""; 
		
		for(j=0;j <= cntrlArray.length ;j++)
		{	
			inputs=document.getElementsByTagName(cntrlArray[j]);
			i = 0;
			for(i=0 ; i < inputs.length ; i++)
			{
				
				if(cntrlArray[j] == "font")
				{
					if(inputs[i].color == "#009966") inputs[i].color = textColor;
				}
				else if(cntrlArray[j] == "td")
				{
					inputs[i].style.color = textColor;
					if(inputs[i].id != "")
					{
						inputs[i].style.backgroundColor = textColor;
						inputs[i].style.color = "white";
					}
					
				}
				else if(inputs[i].type.toLowerCase() == "text" || cntrlArray[j] == "select" )
				{
					if(inputs[i].className.toLowerCase() == "mandatory" )
					{
						inputs[i].style.backgroundColor = mandatoryControlbgColor;   
						inputs[i].style.color = "white";
					}
					else
					{
						inputs[i].style.backgroundColor = ControlbgColor;    
					}	
					
				}	
				else if(inputs[i].type.toLowerCase() == "button")
				{
					inputs[i].style.borderColor = textColor;
					inputs[i].style.backgroundColor = "white";
					inputs[i].style.color = textColor;
				}
				
			}
		
		}
		
		document.body.style.backgroundColor =  pageBackColor;
		
	}
	
}
 
window.onload=new Function('applyCustomSettings(1)');

