/*
<!--
    // Random image generator begin

    //browserName = navigator.appName;
    //browserVersion = parseInt(navigator.appVersion);
    //if (browserName == "Netscape" && browserVersion >= 3) 
    //    version = "nav3";
    //else if (browserName == "Microsoft Internet Explorer" && browserVersion >= 3)
    //    version = "nav3";
    //else 
    //    version= "nav2";
	//
    //imageList = new Array();
    //var i = 0;
	//	
    //imageList[i++] = "<img src='/KLA/images/main_image_01.jpg' width='350' height='413' alt='' border='0'>";     
    //imageList[i++] = "<img src='/KLA/images/main_image_02.jpg' width='350' height='413' alt='' border='0'>";     
    //imageList[i++] = "<img src='/KLA/images/main_image_03.jpg' width='350' height='413' alt='' border='0'>";  
	//
    //var rand = Math.round(Math.random() * (imageList.length - 1));

-->
*/

/*******************************/
/*******************************/
/* Printing option Starts Here */
/*******************************/
/*******************************/
function beforePrint()
{
	if (typeof(tblPrintArea) == "undefined")
	{
		//alert('AAA');
	}
	else
	{
		//alert('BBB');
		divContent.style.display = 'none';
		divPrintArea.innerHTML = tblPrintArea.innerHTML;
	}	
} 

function afterPrint()
{
	divContent.style.display = 'block';
	divPrintArea.innerHTML = "";
}

function printArea()
{
	window.print();
} 

window.onbeforeprint	= beforePrint; 
window.onafterprint		= afterPrint;


/*******************************/
/*******************************/
/* Printing option Ends Here   */
/*******************************/
/*******************************/

var strOpenURL = "";

function OpenSitemap(VirName)
{
	var aPopUp=window.open('/' + VirName + 'Sitemap.aspx', 'Sitemap','toolbar=no,menubar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=yes,left=150,top=20, width=750, height=540')
	aPopUp.focus();
}


function OpenCountry(strURL)
{
	document.all['cbCountry'].selectedIndex = 0;
	
	if (strURL == "")
	{
		strOpenURL = "";
		return;
	}
	
	if (navigator.appName == "Microsoft Internet Explorer")	
		strOpenURL = strURL;
	else
	{
		var aPopUp=window.open(strURL, 'Country', 'width=1024,height=768,toolbar=yes,menubar=yes,scrollbars=yes,location=yes,directories=yes,status=yes,resizable=yes');
		strOpenURL = "";
		aPopUp.focus();
	}
}


function OpenFromSelectionBox()
{
	if (strOpenURL != "")
	{
		var aPopUp=window.open(strOpenURL, 'Country', 'width=1024,height=768,toolbar=yes,scrollbars=yes,menubar=yes,location=yes,directories=yes,status=yes,resizable=yes');
		strOpenURL = "";
		aPopUp.focus();
	}
}


function OpenSearch()
{
	alert("in developing.");
}


function SetSelectMenu(VDName, idx)
{
	//document.all['kla_fMenu'].movie='/' + VDName + 'Swf_NEW/menu.swf?PageNum=' + idx;
}


function trim(str)
{
	var count = str.length;
	var len = count;
	var st = 0;
	
	while ((st < len) && (str.charAt(st) <= ' '))
	{
		st++;
	}
	while ((st < len) && (str.charAt(len - 1) <= ' '))
	{
		len--;
	}
	return ((st > 0) || (len < count)) ? str.substring(st, len) : str;
}
