        if (document.images) {
        about_button_F1 = new Image(86,21); about_button_F1.src = "{$siteurl}/virtual_galleries/images/about_button.gif";
        about_button_F2 = new Image(86,21); about_button_F2.src = "{$siteurl}/virtual_galleries/images/about_button_F2.gif";
        artists_button_F1 = new Image(74,21); artists_button_F1.src = "{$siteurl}/virtual_galleries/images/artists_button.gif";
        artists_button_F2 = new Image(74,21); artists_button_F2.src = "{$siteurl}/virtual_galleries/images/artists_button_F2.gif";
        gallery_button_F1 = new Image(82,21); gallery_button_F1.src = "{$siteurl}/virtual_galleries/images/gallery_button.gif";
        gallery_button_F2 = new Image(82,21); gallery_button_F2.src = "{$siteurl}/virtual_galleries/images/gallery_button_F2.gif";
        contact_button_F1 = new Image(111,21); contact_button_F1.src = "{$siteurl}/virtual_galleries/images/contact_button.gif";
        contact_button_F2 = new Image(111,21); contact_button_F2.src = "{$siteurl}/virtual_galleries/images/contact_button_F2.gif";
        home_button_F1 = new Image(56,21); home_button_F1.src = "{$siteurl}/virtual_galleries/images/home_button.gif";
        home_button_F2 = new Image(56,21); home_button_F2.src = "{$siteurl}/virtual_galleries/images/home_button_F2.gif";
        }
        
        
        function di20(id, newSrc) {
            var theImage = FWFindImage(document, id, 0);
            if (theImage) {
                theImage.src = newSrc;
            }
        }
        
        function FWFindImage(doc, name, j) {
            var theImage = false;
            if (doc.images) {
                theImage = doc.images[name];
            }
            if (theImage) {
                return theImage;
            }
            if (doc.layers) {
                for (j = 0; j < doc.layers.length; j++) {
                    theImage = FWFindImage(doc.layers[j].document, name, 0);
                    if (theImage) {
                        return (theImage);
                    }
                }
            }
            return (false);
        }
	
	function  _CF_checkprocessArtwork(_CF_this)

	{

	return true;

	}
	
     function MM_findObj(n, d) { //v4.0
     var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
     if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
     for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
     if(!x && document.getElementById) x=document.getElementById(n); return x;
     }
     
     function MM_validateForm() { //v4.0
     var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
     for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
     if (val) { nm=val.name; if ((val=val.value)!="") {
  	    if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
	    if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
	    } else if (test!='R') {
	    if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
	    if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
	    min=test.substring(8,p); max=test.substring(p+1);
	    if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
	    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
	    } if (errors) alert('The following error(s) occurred:\n'+errors);
	    document.MM_returnValue = (errors == '');
	    }
	    
     function MM_callJS(jsStr) { //v2.0
	    return eval(jsStr)
	    }
	    
var win = null;

function NewWindow(mypage,myname,w,h,scroll)
{	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

function Open(url,windowname,horz,vert) {
	window.open(url, windowname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + horz + ',height=' + vert );
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function artworkEnqWindow(artworkCode,site,appNumber,artworkCraftinfoPageView){
	Open(site + '/cgi-bin/WebObjects/ArtFind.woa/' + appNumber + '/wa/publicView?seekType=100&artworkCodes=' + artworkCode + '&enquiryCraftinfoPageView=' + artworkCraftinfoPageView,'contactbox','360','430');
}

//function SelectIt(f){
//        if (f.options[f.selectedIndex].value != "none"){ 
//		window.location="http://craftinfo.innovanet.co.nz/cgi-bin/WebObjects/ArtFind.woa/wa/publicView?seekType=61&regionCode=";//+f.options[f.selectedIndex].value;
//}

function go(){
	search = document.form1.region.value;
	if(search!="none")
		search = "&regionCode=" + search;
	else
		search = "";
	redirect = "/cgi-bin/WebObjects/ArtFind.woa/wa/publicView?seekType=61" + search;
	self.location.href=redirect;
}

