	
	
	/* ******************************************* */   
	/* PRIMARY NAVIGATION SCRIPTS                  */                 
	/* ******************************************* */
	
	function pNavAnim(id,newClass){
		document.getElementById(id).className=newClass;
	}
	
	function goURL(url,target)
	{
		if(target == '_self'){
			window.location = url;
		}
		else if(target == '_blank'){
			window.open(url, target);
		}
		else if(target == '_parent'){
			top.location = url;
		}
		else if(target == '_top'){
			top.location = url;
		}
		else{
			window.location = url;
		}
	}
	
	/* ******************************************* */   
	/* ELEMENT OPENING SCRIPTS                     */                 
	/* ******************************************* */

	function art_print(artid)
	{
		w = 600
		h = 600
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("art_print.asp?ArtID="+artid,"PrintPage",features+((features!='')?',':'')+'width='+w+',height='+h);
	}
	
	function art_enquiry(artid)
	{
		w = 450
		h = 430
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("art_enquiry.asp?ArtID="+artid,"ArtEnquire",features+((features!='')?',':'')+'width='+w+',height='+h);
	}
	
	function cat_print(CatID)
	{
		w = 400
		h = 400
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("cat_print.asp?CatID="+CatID,"PrintPage",features+((features!='')?',':'')+'width='+w+',height='+h);
	}
	
	function cat_print(CatID)
	{
		w = 400
		h = 400
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("cat_print.asp?CatID="+CatID,"PrintPage",features+((features!='')?',':'')+'width='+w+',height='+h);
	}
	
	function site_print(siteid)
	{
		w = 400
		h = 400
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("site_print.asp?siteid="+siteid,"PrintPage",features+((features!='')?',':'')+'width='+w+',height='+h);
	}
	
	
	
	function cat_enquiry(CatID)
	{
		w = 450
		h = 430
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("cat_enquiry.asp?CatID="+CatID,"cat_enquiry",features+((features!='')?',':'')+'width='+w+',height='+h);
	}

	function open_legal()
	{
		w = 500
		h = 500
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("Legal.asp","Legal",features+((features!='')?',':'')+'width='+w+',height='+h);
	}

	function open_terms()
	{
		id = 50
		w = 500
		h = 500
		features="scrollbars=yes"
		var myLeft = (screen.width-w)/2;
		var myTop = (screen.height-h)/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
		window.open("Terms.asp?id="+id,"Terms",features+((features!='')?',':'')+'width='+w+',height='+h);
	}

	/* ******************************************* */   
	/* MISC FUNCTIONS                              */                 
	/* ******************************************* */
	
	function SendField(field,URL,error)
	{
		var str = document.getElementById(field).value
		if(str == ''){
			alert(error);
		}
		else{
			window.location = URL + "?" + field + "=" + str
		}
	}
	
function open_win(url,width,height)
{
window.open(url,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width="+width+", height="+height+", left=200,top=150")
}

	function GetImg(ID,img){
	  foto1 = new Image();
	  foto1.src = (img);
	  Controlla(ID,img);
	}
	function Controlla(ID,img){
	  if((foto1.width!=0)&&(foto1.height!=0)){
		viewFoto(ID,img);
	  }
	  else{
		funzione="Controlla('"+ID+"','"+img+"')";
		intervallo=setTimeout(funzione,20);
	  }
	}
	function viewFoto(ID,img){
	  largh=foto1.width+16;
	  altez=foto1.height+50;
	  stringa="width="+largh+",height="+altez;
	  url = "Gallery_View.asp?id="+ID
	  //OpenFull(ID,largh,altez);
	  open_win(url,largh,altez);
	}
	
	function OpenFull(ID,myWidth,myHeight) {
		winName="Gallery"
		features="resizable=no,directories=no,location=0,status=0,scrollbars=no"
		theURL = "Gallery_View.asp?ID="+ID
		var myLeft = (screen.width-myWidth)/2;
		var myTop = (screen.height-(myHeight+150))/2;
		features+=(features!='')?',':'';
		features+=',left='+myLeft+',top='+myTop;
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	}
	
	function high(obj){
		theobject = obj
		highlighting = setInterval("highlightit(theobject)",70)
	}
	function low(which2,alp){
		clearInterval(highlighting)
		which2.filters.alpha.opacity = alp
	}
	function highlightit(cur2){
		if (cur2.filters.alpha.opacity < 100)
			cur2.filters.alpha.opacity += 100
		else if (window.highlighting)
			clearInterval(highlighting)
	}
	
function getFocus(id){
	document.getElementById(id).focus();
}

