// Global variables

// FixMail () variables
var at1 = "@";
var dot = ".";
var typ1 = "com";
var typ2 = "co.uk";
var id1 = "in";    // real id1	
var id2 = "fo";    // real id2
var url1 = "prof";       // real URL
var url2 = "f-art";       // real URL
var fid1 = "dj";      // fake id1
var fid2 = "millett"    // fake id2
var furl1 = "ntlworld";    // fake URL

var mouseOverColour='"this.className=rollOnColour2"';
var mouseOffColour='"this.className=rollOffColour"';

// prevent right-click
am = "The content and images of this web site are copyright material\n";
am += "and must not be reused without written permission from\n";
am += "the Proff-Art Gallery, and the artist where applicable.";
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
	if (bNS && e.which > 1){
	alert(am)
	return false
	} else if (bIE && (event.button > 1)) {
	alert(am)
	return false;
	}
}

document.onmousedown = nrc;
if (document.layers) {
	window.captureEvents(Event.MOUSEDOWN);
	}
if (bNS && bV<5) {
	window.onmousedown = nrc;
	}

function FixMail (obj1) {  // fix a hyperlink mail addr
var tmp;
  tmp = obj1.href;
  obj1.href = "mailto:" + id1 + id2 + at1 + url1 + url2 + dot + typ2;
  // alert ("Fake E-mail address was ... \n   " + tmp + "\n\n\n" +
  //       "Real E-mail address is  ... \n   " + obj1.href);
  return true;             // make it work...
}

// standard header layout
function docDrawHeaderLeft() {
	document.write('<td CLASS=logoCell>');
	document.write('<a class=logoCell href="yrprint.htm#editions"><font weight=100>limited<br>edition<br>prints</font><a></td>');
}

function docDrawHeader() {
	document.write('<td CLASS=bannerCell>');
//	document.write('<table border="1" cellpadding="0" cellspacing="0"><tr><td>');
	document.write('<a href="index.html">');
	document.write('<img border="0" src="_graphics/Hdr_01.gif" align="middle" vspace="2" alt="Click here for The Proff-Art Gallery homepage"></a>');
//	document.write('<td><tr></table>');
	document.write('</td>');
	document.write('<td CLASS=bannerCell>')
//	document.write('<a href="http://www.goldenwebawards.com/officialawardwinner.shtml">');
//	document.write('<img src="http://www.goldenwebawards.com/images/webaward2003a.jpg" width="121" height="77" border="0" align=right></a>');
	document.write('</td>')
}

// use to fill-in button bar if side column is used
function docDrawBtnTop0() {
	document.write('<td CLASS=btnTop0></td>')
}

// standard button bar layout
function docTopBtnAbout() {
	document.write('&nbsp;&nbsp;<a href="about.htm" ID="btnAbout" onMouseover="btnAboutOver()" onMouseOut="btnAboutOut()">')
	document.write('about</a>&nbsp;&nbsp;')
}
function docTopBtnNews() {
	document.write('<a href="news.htm" ID="btnNews" onMouseover="btnNewsOver()" onMouseOut="btnNewsOut()">')
	document.write('news</a>&nbsp;&nbsp;')
}
function docTopBtnGall() {
	document.write('<a href="gallery.htm" ID="btnGall" onMouseover="btnGallOver()" onMouseOut="btnGallOut()">')
	document.write('galleries</a>&nbsp;&nbsp;')
}
function docTopBtnYprint() {
	document.write('<a href="yrprint.htm" ID="btnYprint" onMouseover="btnYprintOver()" onMouseOut="btnYprintOut()">')
	document.write('high&nbsp;quality</a>&nbsp;&nbsp;')
}
function docTopBtnContact() {
	document.write('<a href="contact.htm" ID="btnContact" onMouseover="btnContactOver()" onMouseOut="btnContactOut()">')
	document.write('contact&nbsp;us</a>&nbsp;&nbsp;')
}
function docTopBtnSite() {
	document.write('<a href="site.htm" ID="btnSite" onMouseover="btnSiteOver()" onMouseOut="btnSiteOut()">')
	document.write('site&nbsp;map</a>&nbsp;&nbsp;')
}
function docTopBtnLinks() {
	document.write('<a href="links.htm" ID="btnLinks" onMouseover="btnLinksOver()" onMouseOut="btnLinksOut()">')
	document.write('links</a>&nbsp;&nbsp;')
}
function docTopBtnPhoto() {
	document.write('<a href="photo.htm" ID="btnPhoto" onMouseover="btnPhotoOver()" onMouseOut="btnPhotoOut()">')
	document.write('photos</a>&nbsp;&nbsp;')
}
function docDrawHereAbout() {
	document.write('&nbsp;&nbsp;about&nbsp;&nbsp;')
}
function docDrawHereNews() {
	document.write('news&nbsp;&nbsp;')
}
function docDrawHereGall() {
	document.write('galleries&nbsp;&nbsp;')
}
function docDrawHereYprint() {
	document.write('high&nbsp;quality&nbsp;&nbsp;')
}
function docDrawHereContact() {
	document.write('contact&nbsp;us&nbsp;&nbsp;')
}
function docDrawHereSite() {
	document.write('site&nbsp;map&nbsp;&nbsp;')
}
function docDrawHereLinks() {
	document.write('links&nbsp;&nbsp;')
}
function docDrawHerePhoto() {
	document.write('photos&nbsp;&nbsp;')
}

// standard button behaviour

function btnAboutOver() {btnAbout.style.color='#330066'; btnFtrAbout.style.color='#330066'}
function btnAboutOut() {btnAbout.style.color='#6633CC'; btnFtrAbout.style.color='#6633CC'}
function btnNewsOver() {btnNews.style.color='#330066'; btnFtrNews.style.color='#330066'}
function btnNewsOut() {btnNews.style.color='#6633CC'; btnFtrNews.style.color='#6633CC'}
function btnGallOver() {btnGall.style.color='#330066'; btnFtrGall.style.color='#330066'}
function btnGallOut() {btnGall.style.color='#6633CC'; btnFtrGall.style.color='#6633CC'}
function btnYprintOver() {btnYprint.style.color='#330066'; btnFtrYprint.style.color='#330066'}
function btnYprintOut() {btnYprint.style.color='#6633CC'; btnFtrYprint.style.color='#6633CC'}
function btnContactOver() {btnContact.style.color='#330066'; btnFtrContact.style.color='#330066'}
function btnContactOut() {btnContact.style.color='#6633CC'; btnFtrContact.style.color='#6633CC'}
function btnSiteOver() {btnSite.style.color='#330066'; btnFtrSite.style.color='#330066'}
function btnSiteOut() {btnSite.style.color='#6633CC'; btnFtrSite.style.color='#6633CC'}
function btnLinksOver() {btnLinks.style.color='#330066'; btnFtrLinks.style.color='#330066'}
function btnLinksOut() {btnLinks.style.color='#6633CC'; btnFtrLinks.style.color='#6633CC'}
function btnPhotoOver() {btnPhoto.style.color='#330066'; btnFtrPhoto.style.color='#330066'}
function btnPhotoOut() {btnPhoto.style.color='#6633CC'; btnFtrPhoto.style.color='#6633CC'}

function btnRollover() {
	document[btnID].style.color='#330066';
}
function btnRollout() {
	document[btnID].style.color='#6633CC';
}
function btnSideRollover() {
	this.style.color='#9999FF';
}
function btnSideRollout() {
	this.style.color='#6633CC';
}

	
// Standard footer layout
	//Footer button bar
function docFtrBtnAbout() {
	document.write('&nbsp;&nbsp;<a href="about.htm" ID="btnFtrAbout" onMouseover="btnAboutOver()" onMouseOut="btnAboutOut()">')
	document.write('about</a>&nbsp;&nbsp;')
}
function docFtrBtnNews() {
	document.write('<a href="news.htm" ID="btnFtrNews" onMouseover="btnNewsOver()" onMouseOut="btnNewsOut()">')
	document.write('news</a>&nbsp;&nbsp;')
}
function docFtrBtnGall() {
	document.write('<a href="gallery.htm" ID="btnFtrGall" onMouseover="btnGallOver()" onMouseOut="btnGallOut()">')
	document.write('galleries</a>&nbsp;&nbsp;')
}
function docFtrBtnYprint() {
	document.write('<a href="yrprint.htm" ID="btnFtrYprint" onMouseover="btnYprintOver()" onMouseOut="btnYprintOut()">')
	document.write('high&nbsp;quality</a>&nbsp;&nbsp;')
}
function docFtrBtnContact() {
	document.write('<a href="contact.htm" ID="btnFtrContact" onMouseover="btnContactOver()" onMouseOut="btnContactOut()">')
	document.write('contact&nbsp;us</a>&nbsp;&nbsp;')
}
function docFtrBtnSite() {
	document.write('<a href="site.htm" ID="btnFtrSite" onMouseover="btnSiteOver()" onMouseOut="btnSiteOut()">')
	document.write('site&nbsp;map</a>&nbsp;&nbsp;')
}
function docFtrBtnLinks() {
	document.write('<a href="links.htm" ID="btnFtrLinks" onMouseover="btnLinksOver()" onMouseOut="btnLinksOut()">')
	document.write('links</a>&nbsp;&nbsp;')
}
function docFtrBtnPhoto() {
	document.write('<a href="photo.htm" ID="btnFtrPhoto" onMouseover="btnPhotoOver()" onMouseOut="btnPhotoOut()">')
	document.write('photos</a>&nbsp;&nbsp;')
}

function docFtrRight() {
	document.write('<td CLASS=rightFooter>')
	document.write('www.proff-art.co.uk<br>&#169; The Proff-Art Gallery 2004')
	document.write('</td>')
}

function getArgs () { 
var args = new Object (); // where to put the data
var i,pos,argname,value;
var query = location.search.substring(1); // get query string
var pairs = query.split (",");     // break at comma
  for (i=0; i<pairs.length; i++) {
    pos = pairs[i].indexOf ("=");  // look for name=value
    if (pos == -1) continue;       // skip if not found
    argname = pairs[i].substring (0, pos); // get name
    value = pairs[i].substring (pos + 1);  // get value
    args[argname] = value;         // store as property
  }
return args; // return object
}


