<!-- BEGIN

/* Example
<a href="javascript:NSMailto('javascriptguru.co.uk', 'spam')">link</a> */

function NSMailto(sDomain, sName)
// This function opens a mailer window (just as if the original
// href tag used 'mailto'
{
    var m = "mailto:" + sName + "@" + sDomain;
    document.location.replace(m);
}

/* SwapPic Onload

onLoad="swapPic()"

<div id="RandomImage"></div>

#RandomImage {
   width: 350px;
   height: 225px;
   background-image: url(images/RandPhoto1.jpg);
   background-position: center center;
   background-repeat: no-repeat;
   margin:0;
   padding:0;
   background-color: #fff;
}

 */
 
function swapPic()
 {
 if(document.getElementById)
   {
   var thePicture=document.getElementById("RandomImage");
   var picPath="images/RandPhoto"+rnd(10)+".jpg";
   thePicture.style.background="url("+picPath+")";
   }
 }
function rnd(n)
 {
 return Math.floor(Math.random() * n) + 1;
 } 
 
 function showpopup(filename) {
theWindow = window.open("/popup.php?item="+filename,"Info","directories=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,width=500,height=320");
if (window.focus) {theWindow.focus();}
}

function ClearFieldFocus(f,dt) {
if (f.value==dt) f.value='';
}
function ClearFieldBlur(f,dt) {
if (f.value=='') f.value=dt;
}

function showdiv(id,vis) {
	(DL?DL[id]:(DA?DA[id]:document.getElementById(id)).style).visibility=vis;
}
DL=document.layers;
DA=document.all;
if (DL) { visible='show'; hidden='hide'; }
else if (document.getElementById || DA) { visible='visible'; hidden='hidden'; }
else { visible=''; hidden=''; }

function HoverExtraHeight(myobj) {
	var a=document.getElementById(myobj.id+'_outer');
	myobj.style.height=a.clientHeight;
}

 
// END -->