function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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') { num = parseFloat(val);
        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 (num<min || max<num) 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 == '');
}

var theImages = new Array() 

theImages[0] = '<object height="158" width="290" style="margin-bottom: 10px;" data="flash/epson_ad.swf?clickTag=http://www.epson-europe.com" type="application/x-shockwave-flash"><param name="movie" value="flash/epson_ad.swf"/><param name="clickTag" value="http://www.epson-europe.com"/></object>'
theImages[1] = '<object type="application/x-shockwave-flash" data="flash/terre_sauvage.swf" width="290" height="158" style="margin-bottom:10px;"><param name="movie" value="flash/terre_sauvage.swf" /></object>'

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write(''+theImages[whichImage]+'');
}

var theImages2 = new Array() 

theImages2[0] = '<object type="application/x-shockwave-flash" data="flash/nikon.swf" width="290" height="158" style="margin-bottom:10px;"><param name="movie" value="flash/nikon.swf" /></object>'
theImages2[1] = '<a href="http://www.polar-quest.com/" target="blank"><img src="graphics/ad_polar_quest.jpg" alt="Polar Quest" width="290" height="158" style="margin-bottom:10px;" /></a>'

var j = 0
var p = theImages2.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages2[i]
}
var whichImage2 = Math.round(Math.random()*(p-1));
function showImage2(){
document.write(''+theImages2[whichImage2]+'');
}

var theImages3 = new Array() 

theImages3[0] = 'graphics/prints_01.jpg"'
theImages3[1] = 'graphics/prints_02.jpg"'
theImages3[1] = 'graphics/prints_03.jpg"'

var j = 0
var p = theImages3.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages3[i]
}
var whichImage3 = Math.round(Math.random()*(p-1));
function showImage3(){
document.write('<img src="'+theImages3[whichImage3]+' alt="Example of prints" width="232" height="345"/>');
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  var newWindow = window.open(theURL,winName,features);
   newWindow.focus();
}

function showcountry() {
	var sel = document.getElementById("choosecountry");
	poststr = encodeURI("?CountryID=" + sel.options[sel.selectedIndex].value);

	url = "includes/ajax_showcountry.asp"
	   if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType("text/html; charset=ISO-8859-1");
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
     //alert(url+poststr); 	
	 http_request.onreadystatechange = alert_showcountry;
      http_request.open('GET', url + poststr, true);
	  http_request.setRequestHeader('Content-Type', 'text/xml; charset=ISO-8859-1');
      http_request.send(null);
}

function alert_showcountry() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText); //comment this line out
            result = http_request.responseText;
            document.getElementById('countries').innerHTML = result;
			
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   