$(function(){
	//Set the default directory to find the images needed
	$.fn.fancyzoom.defaultsOptions.imgDir='www/moduler/fancyzoom/ressources/'; //very important must finish with a /
	$('#FancyImg').fancyzoom({Speed:400,overlay:0.2});
});
function GoToLoginCompletedPage(Email,Pwd) {
	
	window.open('?page=registercompleted&Email=' + Email + '&Pwd=' + Pwd,'_self');	

}
function GoToMainpageLogin(From) {
	
	window.open('?page=mainpagelogin&cmd=' + From,'_self');	

}
function GoToMyBoats(ComeFrom,Bid) {
	
	window.open('?page=my_overview&ComeFrom=' + ComeFrom + '&Bid=' + Bid,'_self');	

}
function GoToMySearchAgent(ComeFrom) {
	
	window.open('?page=my_search_agents&cmd=' + ComeFrom,'_self');	

}
function ShowHideRow(divNum, picNum) {

	if(document.all(divNum).style.display=="") { 
		document.all(picNum).src="images/menu_closed.gif";
		document.all(divNum).style.display="none"
		
	} 
	else {

		document.all(picNum).src="images/menu_open.gif";
		document.all(divNum).style.display="";
	}
}
function ShowHidePicText(divNum) {

	if(document.all(divNum).style.display=="") { 
		document.all(divNum).style.display="none"
	} 
	else {
		document.all(divNum).style.display="";
	}
}	
function OpenViewPictureWin(notenr) {
	window.open(''+notenr,'ArtWin','width=600,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no');
}
function OpenContactFormWin(notenr) {
	window.open(''+notenr,'ArtWin','width=500,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no');
}
function CloseContactForm() {
	window.setTimeout('window.close();',3000);
}  
function ShowHide(divNum, picNum) {

	if(document.all(divNum).style.display=="") { 
		document.all(picNum).src="www/images/showhideleft.gif";
		document.all(divNum).style.display="none"
		
	} 
	else {

		document.all(picNum).src="www/images/showhidedown.gif";
		document.all(divNum).style.display="";
	}
}
function ShowHideBrochure(chk, divNum,divNum2) {

	if (document.all(chk).checked==false) {
		document.all(divNum).style.display="none";
		document.all(divNum2).style.display="none";
	}
	else {
		document.all(divNum).style.display="";
		document.all(divNum2).style.display="";
	}		
	
}
function FormatInputBigAndSmall(name,value,opt,big,small,bigheight,smallheight) {
	if (opt==1) {
		document.the_form.elements[name].style.width=big; 
		document.the_form.elements[name].style.height=bigheight; 
	}
	if (opt==2) {
		document.the_form.elements[name].style.width=small; 
		document.the_form.elements[name].style.height=smallheight; 
	}	
}	
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=1050,height=690,left = 328,top = 125');");
}
function popUpWide(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=1,width=1220,height=750,left = 328,top = 125');");
}
