var cImg;

function switchMenu(name,dir){

	if(cImg != name){
		document.images[name].src = 'grafik/menu_fall/' + name + dir + '.jpg';
	}
}

function setImg(newImg,dir){

	cImg = newImg;
	
	document.images[newImg].src = 'grafik/' + newImg + dir + '.gif';
	
}

function openPop(cFile,cWidth,cHeight){
	var popWin = window.open('ads/' + cFile + '.asp','popwin','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,left=30,top=30,resizable=no,width=' + cWidth + ',height=' + cHeight);
	popWin.focus();
}

function openFilePop(cFile,cWidth,cHeight){
	var filepopWin = window.open(cFile + '.asp','filepopwin','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,left=30,top=30,resizable=no,width=' + cWidth + ',height=' + cHeight);
	filepopWin.focus();
}

function openHallow(imgName,cWidth,cHeight){
	var hallowWin = window.open('hallowShow.asp?imgName=' + imgName,'hallowWin','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,left=30,top=30,resizable=no,width=' + cWidth + ',height=' + cHeight);
	hallowWin.focus();
}

function showImg(cImg,cGallery){
	var imgWin = window.open('bustedShow.asp?img=' + cImg + '&gallery=' + cGallery,'bustedwin','toolbar=no,directories=no,status=no,menubar=no,scrollbars=auto,left=25,top=25,resizable=yes,width=600,height=600');
	imgWin.focus();
}

function voteHallow(pic,cName){

	if(confirm('Vill du lägga din röst på ' + cName + '?')){
	
		hForm = document.forms['hallowForm'];
		
		hForm.elements['hallowVote'].value = pic;
		hForm.elements['hallowName'].value = cName;
		hForm.submit();
	
	
	}


}