<!-- 
// JavaScript Document
var setProdType ='';
var iMax = 0;
var iMin = 0;
var reelSlot = 2;
var aProdTypes = new Array();
aProdTypes[0] = new Array('graveerlasers','lion1200','lion900','lion600','babylion','lg500');
aProdTypes[1] = new Array('markeerlasers','fibermarkeerlaser_p20','fibermarkeerlaser_p20i','cm25','cm25i');
aProdTypes[2] = new Array('speciale_lasers','schoonmaaklaser','fiber1200','indexeerlaser');
var typeExistsInArray = '';
var sCurrentType = '';
var sCurrentProd = 1;
var sCurrentProdImg = 'lion1200';
var sCurrentTypeOfProduct='graveerlasers';
var sReelPos ='';
var newPointerPos = 0;
var iNewPointer = 0;
var reelSplitWidth = 25;
var totCWidth = 0;
// Menu functions
function overlay(Id){
	document.getElementById('menuItem_'+Id).src = absPath+'elements/menu/'+Id+'_overlay.png';
}

function overlayOut(Id){
	document.getElementById('menuItem_'+Id).src = absPath+'elements/menu/'+Id+'.png';
}

function presser(Id){
	document.getElementById('menuItem_'+Id).src = absPath+'elements/menu/'+Id+'_click.png';
}

//product selector
function overlayProd(Id){
	document.getElementById(Id).src = absPath+'elements/productselector/'+Id+'_selected.png';
}

function overlayOutProd(Id){
	if(setProdType == Id){
		
	}else{
		document.getElementById(Id).src = absPath+'elements/productselector/'+Id+'.png';
	}
}


//Functies voor het lezen van prod type en product informatie
function rollOverReel(Id,type,imgname){

	if(sCurrentProd!=Id){
		document.getElementById('product_thumb_'+imgname).src = absPath+'images/products/'+type+'/thumbnail_overlay/'+imgname+'.png';
	}
}

function rollOutReel(Id,type,imgname){
	if(sCurrentProd!=Id){
		document.getElementById('product_thumb_'+imgname).src = absPath+'images/products/'+type+'/thumbnail/'+imgname+'.png';
	}
}

//Browser Support Code
function getProdType(typer, arrow,minId,rsw){
	if(rsw){
		reelSplitWidth = rsw;
	}else{
		reelSplitWidth = 25;	
	}
	newPointerPos = 205;
	iNewPointer = 0;
	if(!arrow){
		document.getElementById(typer).src = absPath+'elements/productselector/'+typer+'_selected.png';
		sCurrentType = typer;
		setProdType = typer;
		for(var i=0;i<aProdTypes.length;i++){
			if(setProdType!=aProdTypes[i][0]){
				document.getElementById(aProdTypes[i][0]).src=absPath+'elements/productselector/'+aProdTypes[i][0]+'.png';
			}
			for(var j=1;j<aProdTypes[i].length;j++){
				if(sCurrentProdImg==aProdTypes[i][j]){
					sReelPos=j;
				}
			}
		}
	}else{
		if(arrow=='left'){
			sReelPos++;	
		}
		if(arrow=='right'){
			sReelPos--;
		}
	}
	var ajaxRequest; 	
	try{ajaxRequest = new XMLHttpRequest();	
	} 	catch (e){
	try{ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	alert("Your browser broke!"); return false;
	}	}	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			
			document.getElementById('productreel').innerHTML = ajaxRequest.responseText;
			if(document.getElementById('product_thumb_'+sCurrentProdImg)!=null){
				document.getElementById('product_thumb_'+sCurrentProdImg).src=absPath+'images/products/'+sCurrentTypeOfProduct+'/thumbnail_overlay/'+sCurrentProdImg+'.png';
				for(var iWidth=0;iWidth<aProdTypes.length;iWidth++){
				for(var iWidth2=1;iWidth2<aProdTypes[iWidth].length;iWidth2++){
					if(document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2])!=null){	
						if(iNewPointer<sReelPos){
							newPointerPos+=reelSplitWidth;
							if(aProdTypes[iWidth][iWidth2]==sCurrentProdImg){
								newPointerPos += (document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2]).width/2);			
							}else{
								newPointerPos += document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2]).width;
								
							}
							iNewPointer++;
							
						}
					}
					}
				}
				document.getElementById('reelpointerholder').innerHTML = '<div style="margin-left:'+newPointerPos+'px"><img src="'+absPath+'elements/reelpointer.png" alt="" /></div>';
			}else{
				document.getElementById('reelpointerholder').innerHTML = '<div id="reelpointer1"></div>';	
			}
		}
	}
	if(!arrow){
		ajaxRequest.open("GET", absPath+"typeselector.php?id="+typer, true);
		ajaxRequest.send(null); 
	}else if(minId){
		ajaxRequest.open("GET", absPath+"typeselector.php?arrow="+arrow+"&minId="+minId, true);
		ajaxRequest.send(null); 
	}else{
		ajaxRequest.open("GET", absPath+ "typeselector.php?arrow="+arrow, true);
		ajaxRequest.send(null);
	}
	if(arrow=='right'){
		iMin++;	
	}else if(arrow=='left'){
		iMin--;	
	}
	
}

//Browser Support Code
function getProdInfo(productSetter,type,imgname, reelPos, rsw){
	if(type=='graveerlasers'){
		if(document.getElementById('prodsoftwareholder')== null){
			
		}else{
			document.getElementById('prodsoftwareholder').style.display = 'block';	
			document.getElementById('prodsoftware_markeer').style.display = 'none';
			document.getElementById('prodsoftwareleft').style.display = 'block';
			document.getElementById('prodsoftwareright').style.display = 'block';
		}
	}else if(type=='markeerlasers'){
		if(document.getElementById('prodsoftwareholder')== null){
			
		}else{
			document.getElementById('prodsoftwareholder').style.display = 'block';	
			document.getElementById('prodsoftware_markeer').style.display = 'block';
			document.getElementById('prodsoftwareleft').style.display = 'none';
			document.getElementById('prodsoftwareright').style.display = 'none';	
		}
	}else{
		if(document.getElementById('prodsoftwareholder')== null){
		
		}else{
			document.getElementById('prodsoftwareholder').style.display = 'none';
		}
	}
	if(rsw){
		reelSplitWidth = rsw;
	}else{
		reelSplitWidth = 25;	
	}
	document.title = 'Lion Lasers - '+imgname;
	document.getElementById('bread').innerHTML = 'U bevindt zich hier: <a href="index.php">Lion Lasers</a> > <a href="index.php?pageId=2">producten</a> > '+imgname;
	sCurrentProd = productSetter;
	sCurrentProdImg = imgname;
	sCurrentTypeOfProduct = type;
	iMax=0;
	newPointerPos = 205;
	iNewPointer = 0;
	sReelPos=reelPos;
	document.getElementById('product_thumb_'+imgname).src=absPath+'images/products/'+type+'/thumbnail_overlay/'+imgname+'.png';
	if(sCurrentType==type){
		for(var iCheckType=0; iCheckType<aProdTypes.length;iCheckType++){
			if(aProdTypes[iCheckType][0]==type){
				typeExistsInArray=iCheckType;
			}
		}
		for(var iSetBack=1;iSetBack<aProdTypes[typeExistsInArray].length;iSetBack++){
			if(aProdTypes[typeExistsInArray][iSetBack]!=imgname){
				document.getElementById('product_thumb_'+aProdTypes[typeExistsInArray][iSetBack]).src=absPath+'images/products/'+type+'/thumbnail/'+aProdTypes[typeExistsInArray][iSetBack]+'.png';
				}
		}
	}else{
		for(var iSetBack=0;iSetBack<aProdTypes.length;iSetBack++){
			for(var iSetBack2=1;iSetBack2<aProdTypes[iSetBack].length;iSetBack2++){
				if(aProdTypes[iSetBack][iSetBack2]!=imgname){
					iMax++;
					if(document.getElementById('product_thumb_'+aProdTypes[iSetBack][iSetBack2])!=null){			
						document.getElementById('product_thumb_'+aProdTypes[iSetBack][iSetBack2]).src=absPath+'images/products/'+aProdTypes[iSetBack][0]+'/thumbnail/'+aProdTypes[iSetBack][iSetBack2]+'.png';
					}
				}
			}
		}
	}
	

	var ajaxRequest2; 	
	try{ajaxRequest2 = new XMLHttpRequest();	
	} 	catch (e){
	try{ajaxRequest2 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{ajaxRequest2 = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	alert("Your browser broke!"); return false;
	}	}	}
	// Create a function that will receive data sent from the server
	ajaxRequest2.onreadystatechange = function(){
		if(ajaxRequest2.readyState == 4){
			document.getElementById('prodinfo').innerHTML = ajaxRequest2.responseText;
		}
	}

	ajaxRequest2.open('GET', absPath+'prodselector.php?id='+productSetter, true);
	ajaxRequest2.send(null); 
	
	var ajaxRequest3; 	
	try{ajaxRequest3 = new XMLHttpRequest();	
	} 	catch (e){
	try{ajaxRequest3 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	try{ajaxRequest3 = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (e){
	alert("Your browser broke!"); return false;
	}	}	}
	// Create a function that will receive data sent from the server
	ajaxRequest3.onreadystatechange = function(){
		if(ajaxRequest3.readyState == 4){
			document.getElementById('prodspecs').innerHTML = ajaxRequest3.responseText;
		}
	}

	ajaxRequest3.open('GET', absPath+'prodselector2.php?id='+productSetter, true);
	ajaxRequest3.send(null); 
	 
	for(var iWidth=0;iWidth<aProdTypes.length;iWidth++){
			for(var iWidth2=1;iWidth2<aProdTypes[iWidth].length;iWidth2++){
						
					if(document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2])!=null){	
						if(iNewPointer<sReelPos){
							newPointerPos+=reelSplitWidth;
							
							if(aProdTypes[iWidth][iWidth2]==imgname){
								newPointerPos += (document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2]).width/2);							
							}else{
								newPointerPos += document.getElementById('product_thumb_'+aProdTypes[iWidth][iWidth2]).width;
								
							}
							iNewPointer++;
							
						}
					}
			}
		}
	document.getElementById('reelpointerholder').innerHTML = '<div style="margin-left:'+newPointerPos+'px"><img src="'+absPath+'elements/reelpointer.png" alt="" /></div>';
}

function reelArrowRollOver(side){
	document.getElementById('reelArrow'+side).src=absPath+'elements/reelarrow_'+side+'_overlay.png';
}

function reelArrowRollOut(side){
	document.getElementById('reelArrow'+side).src=absPath+'elements/reelarrow_'+side+'.png';
}

function fSubRollover(page){
	document.getElementById('subpageitem_'+page).src = absPath+'elements/submenu/'+page+'_selected.png';
}

function fSubRollout(page){
		document.getElementById('subpageitem_'+page).src = absPath+'elements/submenu/'+page+'.png';
}
//-->

function fTester(){
	//alert('test');
}

function fTestBack(){
	document.getElementById('test').style.display = 'none';
}

function fGoToPage(pagina,subpagina){
	if(pagina=='producten'){
		location.href=absPath+pagina+'/'+subpagina;
	}else{
		location.href='index.php?pageId='+pagina+'&iPtype='+subpagina;	
	}
}

function fSoftwareLeesmeer(){
	document.getElementById('software_leesmeer_knop').style.display = 'none';	
	document.getElementById('software_leesmeer').style.display = 'block';	
	document.getElementById('software_leesmeer_afb').style.display = 'block';	
}
