<!-- Hide from JavaScript-Impaired Browsers
function initArray() {
for(i=0;i<initArray.arguments.length; i++)
this[i] = initArray.arguments[i];
}

var isnMonths=new initArray("January","February","March","April","May","June","July","August","September","October","November","December");
today=new Date();

function getFullYear(d) { yr = d.getYear();
if (yr < 1000)
yr+=1900;
return yr;
}

function prdate(a){
document.write('<td class="topborder" style="white-space: nowrap; width: 100px; background-color: #B2B1AB; border-color: #82817b">');
document.writeln('<P class="date">'+today.getDate()+' '+isnMonths[today.getMonth()]+' '+getFullYear(today)+'</P>');
document.writeln('<\/td>');
document.close();
}

function pryear(){
document.writeln(getFullYear(today));
document.close();
}

function colourswap (namey, col) {
if (document.all) {document.all[namey].style.color = col;}
else if (document.getElementById) {document.getElementById(namey).style.color = col;}
else if (document.layers) {document.layers(namey).color = col;}
}

function formsub(fname){document.forms[fname].submit();}

function bgChange(namey,bgcol){
if (document.all) {document.all[namey].style.backgroundColor = bgcol;}
else if (document.getElementById) {document.getElementById(namey).style.backgroundColor = bgcol;}
else if (document.layers) {document.layers(namey).bgColor = bgcol;}
}

function CMCopenBrWindow(idfl, picy, howWide, howHigh, border, title) {
  var CMCwidth = (howWide + 0);
  var CMCheight = (howHigh + 0);
  var win = window.open("",idfl,"scrollbars=no, menubar=no, channelmode=no, location=no, status=no, resizable=no, width="+CMCwidth+", height="+CMCheight);
  var doc = win.document;
  doc.open("text/html", "replace");
  doc.writeln("<html><head><title>"+title+" at the Oakham Contemporary Gallery, London.<\/title>");
  //doc.writeln("<base href='http:\/\/www.panterandhall.com\/'>");
  doc.writeln("<link rel='stylesheet' type='text\/css' href='css\/gallerystyle.css'><\/head>");
  doc.writeln("<body bgcolor='#f8f7eb' topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
  doc.writeln("<center><table width='100%' height='"+CMCheight+"'cellpadding='0' cellspacing='0' border='0'>");
  doc.writeln("<tr><td width='100%' align='center' bgcolor='#e6e6d8' style='vertical-align: middle;'>");
  doc.writeln("<p class='exhpicture' style='vertical-align: middle; margin: 0px;'><img src='images"+picy+"' border='"+border+"' width='"+howWide+"' height='"+howHigh+"'><\/p>");
  doc.writeln("<\/td><\/tr><\/table><\/body><\/html>");  
doc.close();
}

function ImagePOP() {
window.open('http://www.panterandhall.com/cgi-bin/db-man/Test_Dir.cgi','filelist','scrollbars=yes, menubar=no, channelmode=no, location=no, status=no, resizable=no, width=350, height=600');
}

function BuyPOP(urlloc,idfl) {
window.open(urlloc,idfl,'top=0, left=0,scrollbars=yes, menubar=no, channelmode=no, location=no, status=yes, resizable=yes, width=520, height=610');
}

function premail(a,b){
document.write("<a href='mailto:" + a + "@oakhamcontemporary.com' name='" + b + "'>" + b + "</a>");
}

function premaily(a, b){
document.write("mailto:" + a + "@oakhamcontemporary.com' name='" + b + "'");
}


if (document.images) {
backactive=		  	  	 new Image;
backpassive =	 	  	 new Image;
backmenuactive =  	   	 new Image;
backmenupassive =	 	 new Image;
bartistactive =		 	 new Image;
bartistpassive =	 	 new Image;
bexhibactive = 		 	 new Image;
bexhibpassive =		 	 new Image;
vexhibactive =		 	 new Image;
vexhibpassive =		 	 new Image;
vmoreactive = 		 	 new Image;
vmorepassive =		 	 new Image;
localmapactive = 		 new Image;
localmappassive =		 new Image;
pexhibactive =			 new Image;
pexhibpassive =			 new Image;
cexhibactive =			 new Image;
cexhibpassive =			 new Image;
goactive =	  			 new Image;
gopassive =				 new Image;
faintactive =			 new Image;
faintpassive =			 new Image;
pressactive =			 new Image;
presspassive =			 new Image;
previousactive =        new Image;
previouspassive =       new Image;
currentactive =         new Image;
currentpassive =        new Image;
backactive.src =	 	 "images/bd_back.gif";
backpassive.src =	 	 "images/bu_back.gif";
backmenuactive.src =	 "images/bd_back_to_menu.gif";
backmenupassive.src	=	 "images/bu_back_to_menu.gif";
bartistactive.src =		 "images/bd_back_to_artist.gif";
bartistpassive.src =	 "images/bu_back_to_artist.gif";
bexhibactive.src = 		 "images/bd_back_to_exhibition.gif";
bexhibpassive.src =		 "images/bu_back_to_exhibition.gif";
vexhibactive.src =		 "images/bd_view_exhib.gif";
vexhibpassive.src =		 "images/bu_view_exhib.gif";
vmoreactive.src = 		 "images/bd_view_more.gif";
vmorepassive.src =		 "images/bu_view_more.gif";
localmapactive.src = 	 "images/bd_localmap.gif";
localmappassive.src =	 "images/bu_localmap.gif";
pexhibactive.src =		 "images/bd_previous_exhib.gif";
pexhibpassive.src =		 "images/bu_previous_exhib.gif";
cexhibactive.src =		 "images/bd_current_exhib.gif";
cexhibpassive.src =		 "images/bu_current_exhib.gif";
goactive.src =			 "images/go-red.gif";
gopassive.src =			 "images/go.gif";
faintactive.src =		 "images/arrow-redfaint.gif";
faintpassive.src =		 "images/arrow-faint.gif";
pressactive.src =		 "images/bd_press.gif";
presspassive.src =		 "images/bu_press.gif";
previousactive.src =        "images/bd_previous.gif";
previouspassive.src =       "images/bu_previous.gif";
currentactive.src =        "images/bd_current.gif";
currentpassive.src =       "images/bu_current.gif";
}
else {
backactive.src = 		 "";
backpassive.src =		 "";
backmenuactive.src =	 "";
backmenupassive.src =	 "";
bartistactive.src =		 "";
bartistpassive.src =	 "";
bexhibactive.src = 		 "";
bexhibpassive.src =		 "";
vexhibactive.src =		 "";
vexhibpassive.src =		 "";
vmoreactive.src = 		 "";
vmorepassive.src =		 "";
localmapactive = 		 "";
localmappassive =		 "";
pexhibactive.src =		 "";
pexhibpassive.src =		 "";
cexhibactive.src =		 "";
cexhibpassive.src =		 "";
goactive.src =			 "";
gopassive.src =			 "";
faintactive.src =		 "";
faintpassive.src =		 "";
pressactive.src =		 "";
presspassive.src =		 "";
previousactive.src =    "";
previouspassive.src =   "";
currentactive.src =        "";
currentpassive.src =       "";
}

function changeImage(imgField, newImg) {
if (document.images) {document[imgField].src = eval(newImg + ".src")}
}


function ToggleDisplay(id)
{
    var elem = document.getElementById(id);
    
    if (elem) 
    {
      if (elem.style.display != 'block') 
      {
        elem.style.display = 'block';
        elem.style.visibility = 'visible';
      } 
      else
      {
        elem.style.display = 'none';
        elem.style.visibility = 'hidden';
      }
    }
}

