function popIm(id,d){
	//26.06.2006 SF
	if (!d)
	    window.open("http://www.omega.ee/Showimage.php?id="+id+"&l=fin","popIm","top=10,left=20,resizable=no,width=200,height=200,status=no,location=no,menubar=no,scrollbars=yes")    
	else
	    window.open("/Showimage.php?id="+id,"popIm","top=10,left=20,resizable=no,width=200,height=200,status=no,location=no,menubar=no,scrollbars=yes")
}

/*function popSpecialIm(id,module){
	window.open("http://www.omega.ee/Showimage.php?id="+id+"&module="+module,"popIm","top=10,left=20, resizable=no,width=200,height=200,status=no,location=no,menubar=no,scrollbars=yes")
}*/
function popSpecialIm(id,module){
	//temp muudatus
	window.open("http://www.e-kodinkoneet.fi/Showimage2.php?id="+id+"&module="+module,"popIm","top=10,left=20, resizable=no,width=200,height=200,status=no,location=no,menubar=no,scrollbars=yes")
}

function popSpecialIm2(id,module){
	window.open("/ShowGntImage.php?id="+id+"&module="+module,"popIm","top=10,left=20, resizable=yes,width=350,height=350,status=no,location=no,menubar=no,scrollbars=yes")
}

function popUserRegForm(addValues){
	window.open("/Register.php?"+addValues,"popUp","top=10,left=20,resizable=no,width=700,height=500,status=no,location=no,menubar=no,scrollbars=yes")
}

function checkInt(field, minInt, maxInt){
	var value=parseInt(field.value);
	field.value=value
	if((value<minInt) || (!value))
		field.value=minInt;
	else if(value>maxInt)
		field.value=maxInt;
}

function popWin(url,he,wi){
	if(he<=0)he = '400';
	if(wi<=0)wi = '355';
	
	var kyssa=window.open(url,'','scrollbars=yes,width='+wi+',height='+he+',resizable=yes,top=20,left=150');	
}

function popGal(id){
	window.open('/galerii.php?lang={VAR:lang}&id='+id,'','resizable=no,width=600,height=650,status=no,location=no,menubar=no,scrollbars=yes');
}

function showFile(id){
	height = '300';
	width = '300';
	window.open('/showFile.php?id='+id,'','scrollbars=yes,width='+width+',height='+height+',resizable=yes,top=50,left=200');
}

function popTerm(id,lang){
	window.open('http://www.omega.ee/popTerm.php?id='+id+'&lang='+lang,'','resizable=no,width=400,height=200,status=no,location=no,menubar=no,scrollbars=yes');
}

function gotoBank(sess,cartID){
	window.open('bank.php?sess_id='+sess+'&cartID='+cartID,'','resizable=yes,status=yes,location=yes,menubar=yes,scrollbars=yes,width=600,height=500');
}

function gotoBank1(sess,cartID){
	//alert("Will be soon !!!");
    location.href='http://www.e-kodinkoneet.fi/cbank.php?sess_id='+sess+'&cartID='+cartID;
	//window.open('cbank.php?sess_id='+sess+'&cartID='+cartID,'','resizable=yes,status=yes,location=yes,menubar=yes,scrollbars=yes,width=600,height=500');
}


function popPReq(id,catID){
	//window.open('prequest.php','','resizable=no,width=500,height=300,status=no,location=no,menubar=no,scrollbars=yes');
	//19.03.2009;28.06.2009;04.02.2010
	if (id)
	{
	    var cat='';
		if (catID)
		    cat='&catID='+catID;
		window.open('/prequest.php?prodID='+id+cat,'','resizable=no,width=630,height=500,status=no,location=no,menubar=no,scrollbars=yes');
	}
	else
	    window.open('/prequest.php','','resizable=no,width=630,height=500,status=no,location=no,menubar=no,scrollbars=yes');
}

function popTrans(id){
	window.open('/popTrans.php?id='+id,'','resizable=no,width=400,height=200,status=no,location=no,menubar=no,scrollbars=yes');
}
