window.name = "mainwindow";
function resizePic(mod, divid, picid){
	if(mod == "over"){
		document.getElementById(divid).style.zIndex=2;document.getElementById(picid).style.width='120px';document.getElementById(picid).style.height='120px';document.getElementById(picid).style.position='absolute';document.getElementById(picid).style.top='-10px';document.getElementById(picid).style.left='-10px';
	}
	if(mod == "out"){
		document.getElementById(divid).style.zIndex=1;document.getElementById(picid).style.width='100px';document.getElementById(picid).style.height='100px';document.getElementById(picid).style.position='absolute';document.getElementById(picid).style.top='0px';document.getElementById(picid).style.left='0px';
	}
}
var act_gallery, act_pic, act_length;
function openGallery(i, p, al){
	act_gallery = i;
	act_pic = p;
	act_length = al;
	document.getElementById("maindiv").style.opacity=0.07;
	document.getElementById("maindiv").style.filter='alpha(Opacity=7)';
	document.getElementById("gallery_"+i).style.visibility='visible';
	document.getElementById("galdiv_"+i+"_"+p).style.visibility='visible';
}
function closeGallery(){
	document.getElementById("maindiv").style.opacity=1;
	document.getElementById("maindiv").style.filter='alpha(Opacity=100)';
	document.getElementById("gallery_"+act_gallery).style.visibility='hidden';
	document.getElementById("galdiv_"+act_gallery+"_"+act_pic).style.visibility='hidden';
}
function backPic(){
	document.getElementById("galdiv_"+act_gallery+"_"+act_pic).style.visibility='hidden';
	if((act_pic - 1) > -1){
		act_pic--;
	}
	else{
		act_pic = act_length-1;
	}
	document.getElementById("galdiv_"+act_gallery+"_"+act_pic).style.visibility='visible';
}
function ffwdPic(){
	document.getElementById("galdiv_"+act_gallery+"_"+act_pic).style.visibility='hidden';
	if((act_pic + 1) < act_length){
		act_pic++;
	}
	else{
		act_pic = 0;
	}
	document.getElementById("galdiv_"+act_gallery+"_"+act_pic).style.visibility='visible';
}