// EMAIL ADDRESS WRITER

function writeEmail(pop)
{
   var server = "triche-osborne.com";

   document.write('<a href=mailto:' + pop + '@' + server + ' onmouseover="buttonOn\(\'b-contact\'\);" onmouseout="buttonOff\(\'b-contact\'\);"><img src="./images/b_contact.gif" alt="Send us email." class="livelink0" id="b-contact" /></a>');
}

function buttonOn(imageId)
{
   if (!document.layers)
   {
   button = document.getElementById(imageId);
   button.className = "livelink1";
   }
}

function buttonOff(imageId)
{
   if (!document.layers)
   {
   button = document.getElementById(imageId);
   button.className = "livelink0";
   }
}

// POPUP WRITER

function popUp(image_url, width, height) 
{
   var view_width = parseInt(width) + 40;
   var view_height = parseInt(height) + 70;

   var view_width = view_width.toString();
   var view_height =  view_height.toString();

   var look="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=" + view_width + ",height=" + view_height;

   popwin=window.open("","",look);
   popwin.document.open();
   popwin.document.write('<head><title>Close Up</title>');
   popwin.document.write('<link rel="stylesheet" href="./style.css" type="text/css">');
   popwin.document.write('<meta http-equiv="imagetoolbar" content="no">');
   popwin.document.write('</head>');
   popwin.document.write('<body alink="#cc6699" class="popup">');
   popwin.document.write('<div align="center">');
   popwin.document.write('<img src="'+image_url+'">');
   popwin.document.write('<form><input type=submit value="Close" class="submit0" onmouseover="this.className=\'submit1\'" onmouseout="this.className=\'submit0\'" onClick="self.close();"></form>');
   popwin.document.write('</div>');
   popwin.document.write('</body>');
   popwin.document.close();

}