
var agt=navigator.userAgent.toLowerCase();
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var ImageNr = 0;
var loopActive = true;


function funGetProductHP(intNewItem){
	loopActive = false;
	funViewProductHP(intNewItem);
}

function funGetProductHPOver(intOver){
	if (document.getElementById("HP_Counter"+intOver).className != 'Module_ProductHP_CounterItem_Active'){
		document.getElementById("HP_Counter"+intOver).className = 'Module_ProductHP_CounterItem_Over';	
	}
}
function funGetProductHPOut(intOver){
	if (document.getElementById("HP_Counter"+intOver).className != 'Module_ProductHP_CounterItem_Active'){
		document.getElementById("HP_Counter"+intOver).className = 'Module_ProductHP_CounterItem';	
	}
}


function funViewProductHP(intNewItem){
	var strCurrentItem = "HP_Counter"+intCurrentItem
	var strNewItem = "HP_Counter"+intNewItem
	document.getElementById(strCurrentItem).className = 'Module_ProductHP_CounterItem';	
	document.getElementById(strNewItem).className = 'Module_ProductHP_CounterItem_Active';	
	intCurrentItem = intNewItem;
	FunGetProductHP();
}


function FunGetProductHP(){
//	document.getElementById('Module_ProductHP').innerHTML = 'Reis wordt opgehaalt.'
	var xmlHttp;
	try{ // Firefox, Opera 8.0+, Safari  
		xmlHttp=new XMLHttpRequest();  
	}
	catch (e){  // Internet Explorer  
		try{    
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
		}
		catch (e){    
			try{
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
			}
			catch (e){      
				return false;      
			}  
		}  
	}

	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById('Module_ProductHP').innerHTML = xmlHttp.responseText;
		}
	}
	strScript = '_Module_ProductHP_GetData.asp?Item='+intCurrentItem+'&strTitelModule='+strTitelModule
	
	xmlHttp.open("GET",strScript,true);
	xmlHttp.send(null); 
}




setTimeout("funLoopProductHP()", 6000);
function funLoopProductHP(){
	if (loopActive == true){
		ImageNr = ImageNr + 1
		funViewProductHP(arrModule_ProductHP[ImageNr])
		if (ImageNr >= arrModule_ProductHP.length-1) {
			ImageNr = -1;
		}
		setTimeout("funLoopProductHP()", 6000);
	}
}
