//-------------------------------------------------------------------------------
//Product-OBJECT
var productLijstPHP=new Array(100);

function product(n,afb,ltr,code,type,volt,kw,lmin,bar,rpm,nrfilter,db,abc,kg)
{
	this.n=n;
	this.afb=afb;
	this.ltr=ltr;
	this.code=code;
	this.type=type;
	this.volt=volt;
	this.kw=kw;
	this.lmin=lmin;
	this.bar=bar;
	this.rpm=rpm;
	this.nrfilter=nrfilter;
	this.db=db;
	this.abc=abc;
	this.kg=kg;
	
}

function addProducts()
{	
	
productLijstPHP[1]=new product("Continue drive 1","continuedrive1.jpg","20","PMZ/592/4","Mebis","400/3","3","590","10","1420","2-V","79","79 x 62 x 74","78");
productLijstPHP[2]=new product("Continue drive 2","continuedrive2.jpg","3,5","PMZ/119/5,5","Mebis","400/3","5,5","674","8","950","2","80","115 x 75 x 75","115");
productLijstPHP[3]=new product("Continue drive 3","continuedrive3.jpg","20","HondaGx120/4/102","Mebis","","3","320","10","1420","2","82","75 x 70 x 95","69");
productLijstPHP[4]=new product("Polaire","polaire.jpg","2,4","Me/212/1,5","Mebis","230/1","1,1","200","10","2850","1","77","53 x 27 x 42","16");
productLijstPHP[5]=new product("Konkav 1","konkav1.jpg","9,5","Me/212/1,5","Mebis","230/1","1,1","200","10","2850","1","77","41 x 34 x 63","21");
productLijstPHP[6]=new product("Konkav 2","konkav2.jpg","20","Me/282/2,5","Mebis","230/1","1,8","255","10","2850","1","79","48 x 41 x 80","32");
productLijstPHP[7]=new product("Konkav 3","konkav3.jpg","20","Me/402/3","Mebis","400/3","2,2","400","10","2850","2-V","81","48 x 45 x80","36");
productLijstPHP[8]=new product("Torpedo 1","torpedo1.jpg","18","Me/282/2,5","Mebis","230/1","2,5","255","10","2850","1","79","48 x 41 x 80","32");
productLijstPHP[9]=new product("Torpedo 2","torpedo2.jpg","","Me/402/3","Mebis","230/1","2,2","400","10","2850","2-V","81","61 x 61 x 53","43");
productLijstPHP[10]=new product("Grafic 1","grafic1.jpg","24","","Mebis","230/1","1,1","200","10","2850","1","77","65 x 31 x 61","25");

}

function setSelectedProduct(key)
{
	
	document.getElementById("naam").value= productLijstPHP[key].n;
	setSelectedImage(productLijstPHP[key].afb);
	document.getElementById("ltr").value= productLijstPHP[key].ltr;
	document.getElementById("code").value= productLijstPHP[key].code;
	document.getElementById("type").value= productLijstPHP[key].type;
	document.getElementById("volt").value= productLijstPHP[key].volt;
	document.getElementById("kw").value= productLijstPHP[key].kw;
	document.getElementById("lmin").value= productLijstPHP[key].lmin;
	document.getElementById("bar").value= productLijstPHP[key].bar;
	document.getElementById("rpm").value= productLijstPHP[key].rpm;
	document.getElementById("nrfilter").value= productLijstPHP[key].nrfilter;
	document.getElementById("db").value= productLijstPHP[key].db;
	document.getElementById("abc").value= productLijstPHP[key].abc;
	document.getElementById("kg").value= productLijstPHP[key].kg;
}


//--------------------------------------------------------------------------







//-------------------------------------------------------------------------------



var ie = document.all?true:false;

var ns = document.layers?true:false;

var dom = document.getElementById?true:false;



//-------------------------------------------------------------------------------



function get_object(object_id)

{

 if(dom && document.getElementById(object_id))

 {

  return document.getElementById(object_id);

 }

 else if (ie && document.all(object_id))

 {

  return document.all(object_id);

 }

 else if (ns && document.layers[object_id]) 

 {

  return document.layers[object_id];

 }

 else 

 {

  return false;

 }



}

//-------------------------------------------------------------------------------



function get_object_style(object_id) 

{

 if(dom && document.getElementById(object_id))

 {

  return get_object(object_id).style;

 }

 else if (ie && document.all(object_id))

 {

  return get_object(object_id).style;

 }

 else if (ns && document.layers[object_id]) 

 {

  return get_object(object_id);

 }

 else 

 {

  return false;

 }

} 

//---------------------------------------------------------------------------------

function setSelectedImage(path)

{
foto="../img/"+path;
document.getElementById("afbeelding").src=foto;
}

//----------------------------------------------------------------------------------


function setSelectedGroup(key)

{
doc=get_object(key).value;
foto="../../shared/fotos/"+doc;
document.getElementById("groupsimg").src=foto;
}

//------------------------------------------------------------------------------------
