/* opens the copyright page
   used with oncontextmenu event to prevent img download
*/
function copyright() {
parent.window.location='copyright.html';
return false;
}

/* init nav bar: show with css and then hide with js so that
   it'll be visible if js isn't present
*/
function nav(state) {
document.getElementById("nav").className=state;
}

/* init navigation on index page onclick & oncontextmenu
   return false to prevent contextmenu to show
*/
function shownav() {
document.getElementById("nav").className='idx show';
return false;
}

/* gets img name and title from url of the form "url?name&title"
   and writes html code accordingly
*/
function gurlimg() {
var urltail = window.location.href.split("?")[1];
var urlargs = urltail.split("&");
document.write("<p><img alt='"+urlargs[0]+"' src='ximags/"+urlargs[0]+".jpg' "
    +"oncontextmenu='return copyright()'></p><p>"+unescape(urlargs[1])+"</p>");
}

/* checks whether img's are portrait or landscape and assigns css class
   1.1 scaling for close-to-square images (see imgprep shell script)
*/
function orieimg() {
for ( i=0; i < document.images.length; i++ ) {
   if ( document.images[i].className == "" ) {
      if ( 1.1*document.images[i].width < document.images[i].height ) {
         document.images[i].className='ov';
         } else {
         document.images[i].className='oh';
         }
      }
   }
}

/* eMail Obfuscator Script 1.31 by Tim Williams - freeware
   http://www.u.arizona.edu/~trw/spam/
*/
function smail() {
/*document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,110,105,109,111,114,101,106,64,103,111,111,103,108,101,109,97,105,108,46,99,111,109,34,62,110,105,109,111,114,101,106,64,103,111,111,103,108,101,109,97,105,108,46,99,111,109,60,47,97,62))*/
/*document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,104,101,105,107,101,64,106,101,114,111,109,105,110,46,99,111,46,117,107,34,62,104,101,105,107,101,64,106,101,114,111,109,105,110,46,99,111,46,117,107,60,47,97,62))*/
document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,106,101,114,111,109,105,110,64,106,101,114,111,109,105,110,46,99,111,46,117,107,34,62,106,101,114,111,109,105,110,64,106,101,114,111,109,105,110,46,99,111,46,117,107,60,47,97,62))
}


