function open_form(obj){
window.open(obj.href, 'form', 'width=800,scrollbars=1');
return false;
}

function setLang(name) {
	document.getElementById("hiddenLanguage").value = name;
	document.getElementById("formSwitchLanguage").submit();
	return false;
}

function setCookie(name, value, path) {
expire=new Date();
expire.setTime(expire.getTime()+365*24*60*60*1000);
   document.cookie = name + "=" + escape(value)
   + "; expires=" + expire.toGMTString()
   + "; path=" + path;

   document.cookie = name + "=" + escape(value);
document.location.reload();
return false;
}

if(document.all && !window.opera)
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"ie.css\" />");

if(window.opera)
	document.getElementsByTagName("html")[0].lang="opera";
	
function init_mi(){
	objs=document.body.getElementsByTagName("img");
	for(i=0; i<objs.length;i++){
		if(objs[i].name!=""){
			objs[i].style.background="url(imgs/"+lang+"/mi_a/"+objs[i].name+")";
			objs[i].onmouseover=function(){this.src="imgs/"+lang+"/mi_a/"+this.name}
			objs[i].onmouseout=function(){this.src="imgs/"+lang+"/mi/"+this.name;}
		}
	}
	
}


function view(img,img2,flash){
img="img="+img;
img2=(img2?"&img2="+img2:"");
win=(img2?"img2":"img");
par=(img2?"width=620,height=892,scrollbars=1":"width=600,height=532");
if(flash && flash==1)par="width=920,height=770,scrollbars=1";
if(flash && flash==2)par="width=720,height=620,scrollbars=1";
if(flash && flash==3)par="width=820,height=695,scrollbars=1";
if(flash && flash==4)par="width=870,height=770,scrollbars=1";
flash=(flash?"&flash="+flash:"");
window.open(document.getElementsByTagName("base")[0].href+'view.php?'+img+img2+flash, win+Math.round(Math.random()*1000), par+',top=0,left=0');
return false;
}