function gotoURL(pUrl,indexNum) {
		if (pUrl != '') { 
			url = new String(pUrl);
			window.location.href = url;
	}
}

/*
--------------------------------------------------------
Search
--------------------------------------------------------
*/

function postSearch(searchStr){
	document.mainform.method="post";
	document.mainform.action="/search.aspx?search=" + searchStr;
	document.mainform.submit();

}



function checkEnter(e,caller) //e is event object passed from function invocation
{

	var characterCode //literal character code will be stored in this variable

	if(e && e.which)
	{ //if which property of event object is supported (NN4)
		e = e
		characterCode = e.which //character code is contained in NN4's which property
	}
	else
	{
		e = event
		characterCode = e.keyCode //character code is contained in IE's keyCode property
	}

	if(characterCode == 13)//if generated character code is equal to ascii 13 (if enter key)
	{ 
		document.getElementById(caller).click();
		return false
	}
	else
	{
		return true
	}
}


//window.attachEvent('onload', resizeContent);

function changeProdImg(group){
	group = "/images/spacer.gif";
	document.getElementById("productGroupImg").src = group;
	document.getElementById("productGroupImg").className = "productSmall";
	document.getElementById("productGroupImg").align = "right";
	}

/*
Change Picture (Product Introduction page)
*/

function changePicture(src){
	var path = src;
	var image = '<img src='+path+' alt="" class="" />';
	document.getElementById('productImage').innerHTML = image;
}


/*
Adobe Flash detector 
*/
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
// Version check based upon the values entered above in "Globals"
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
// -----------------------------------------------------------------------------
/*
/ Adobe Flash detector 
*/
function changeVideo(src,duration){
	var totalTime	= duration;
	var path		= src;
	if (hasReqestedVersion) {
	//var video = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"  width="235" height="240" id="flashvideo" align="middle" VIEWASTEXT><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="/images/video.swf?video='+src+'&duration='+totalTime+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="/images/video.swf?video='+src+'&duration='+totalTime+'" quality="high" bgcolor="#ffffff"  width="240" height="320" name="flashvideo" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	var video = '<embed src="/images/video.swf?video='+src+'&duration='+totalTime+'" quality="high" bgcolor="#FFFFFF" name="detectionExample" allowscriptaccess="sameDomain" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" align="middle" width="260" height="260">';
	}
	else{
	
	var video = '<div style="width:260px; height:260px; text-align:center;"><a href="http://www.adobe.com/go/getflashplayer"><img src="/images/get_flash_player.gif" border="0" alt="" /></a></div>';
	}

	document.getElementById('productImage').innerHTML = video;
	
}

function isDefined(property) {
  return (typeof property != 'undefined');
}





// country dropdown
sfHover = function() {
if(document.getElementById("navlist")){
	var sfEls = document.getElementById("navlist").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function openProductComparison(){
	window.open('/Modules/Product Comparison/ProductComparison.aspx','productComparator', 'width=890,height=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes');
}

/*
	The Worldmap
*/

function showContinent(continent) {
	document.getElementById(continent).style.visibility = "visible";
	hideOthers(continent);
}
function hideOthers(continent) {
	elem = document.getElementById('pics');	
	elems = elem.getElementsByTagName('div');	
	for (var i = 0; i < elems.length; i++) {
		if (elems[i].id != continent && elems[i].id != 'pics' && elems[i].id != 'world') {
			//alert(elems[i].id);
			elems[i].style.visibility = "hidden";
		}
	}
}

function showMapList(list) {	
	elem = document.getElementById('maplists');
	elems = elems = elem.getElementsByTagName('div');
	for (var i = 0; i < elems.length; i++) {
		if (elems[i].id != 'maplists') {
			elems[i].style.display = "none";
		}
	}
	theelem = document.getElementById(list);
	if (theelem) {
		theelem.style.display = "block";
	}	
}

/*
/	The Worldmap
*/


/*Product comparator*/

function checkAndCompare(itm){
	
	
	//var showCol document.getElementById(itm);
	
	if(document.forms[0].comparator){
	var max = document.forms[0].comparator.length;
	var totalChecked = 0;
	var areaWidth = 440;
	
	// loop through checkboxes
	for (var idx = 0; idx < max; idx++) {
		
		document.forms[0].comparator[idx].disabled = false;
		document.getElementById("label"+document.forms[0].comparator[idx].value).style.color = "Black";
		
		var tdID = document.getElementById("col"+document.forms[0].comparator[idx].value);
		
		
		// count actives
		if (eval("document.forms[0].comparator[" + idx + "].checked") == true) {
			totalChecked += 1;
			if(document.all){
			tdID.style.display = "block";
			}
			else{
			tdID.style.display = "table-cell";
			}
			
			
		}
		else{
		
			tdID.style.display = "none";
		
		}
		
	}
	
	
	}
	// loop again and put nice width for td's
	for (var idx = 0; idx < max; idx++) {
	var tdID = document.getElementById("col"+document.forms[0].comparator[idx].value);
		var tdID = document.getElementById("col"+document.forms[0].comparator[idx].value);
		var tblID = document.getElementById("tbl"+document.forms[0].comparator[idx].value);
		if(tdID.style.width){
			tdID.style.width = (areaWidth/totalChecked)-2+"px";
			tblID.style.width = (areaWidth/totalChecked)-2+"px";
		}
	}
	
	if(totalChecked > 2){
		disableUnChecked();
	}
}
function disableUnChecked(){
var max = document.forms[0].comparator.length;

	for (var idx = 0; idx < max; idx++) {
	if (eval("document.forms[0].comparator[" + idx + "].checked") != true) {
		document.forms[0].comparator[idx].disabled = true;
		document.getElementById("label"+document.forms[0].comparator[idx].value).style.color = "Gray";
	}
	
	}

}

function openTechSpecPrint(path){
	
	var max = document.forms[0].comparator.length;
	var products = "";
	for (var idx = 0; idx < max; idx++) {
	if (eval("document.forms[0].comparator[" + idx + "].checked") == true) {
			
		products = products + document.forms[0].comparator[idx].value+"|";
	}
	
	}
	window.open(path+'&selected='+products, 'PopupPage','scrollbars=yes, resizable=yes', height='100%', width='100%');
	//alert(path+"&selected="+products)
}

/**

 {
	window.onload = init;

}

function init() {

	// Resize yellow left column to fill at least height of left menu
	var leftMenuH = document.getElementById("leftcol").offsetHeight;
	var contentH = document.getElementById("contentWide").offsetHeight;
	var leftContent = document.getElementById("contentLeft");

	if(leftMenuH>contentH){

		leftContent.style.height = leftMenuH+"px";
	}
	window.onload = init; {
	
	}
}

**/
function productsLoading(){
	document.getElementById('load').style.display = 'block';
}
