/**************************************************************************************************************************************************/


MM_swapImgRestore = function() { var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; }

MM_preloadImages = function() { 
  var d=document; 
  if(d.images){ 
    if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
    for(i=0; i<a.length; i++)  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}
   }
}

MM_findObj = function(n, d) {
  var p,i,x;  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

MM_swapImage = function() { 
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array;
  for(i=0;i<a.length;i+=2) if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+1]; }    
}

function getWinHeight() {
	var winHt = 0;
	if (window.innerHeight) winHt = window.innerHeight-18;
	else if (document.documentElement && document.documentElement.clientHeight) 
		winHt = document.documentElement.clientHeight;
	else if (document.body && document.body.clientHeight) 
		winHt = document.body.clientHeight;
	return winHt;
}	
function getWinWidth() {
	var winWd = 0;
	if (document.documentElement && document.documentElement.clientWidth) 
		winWd = document.documentElement.clientWidth;
	else if (document.body && document.body.clientWidth) 
		winWd = document.body.clientWidth;
	else if (document.body && document.body.offsetWidth) 
		winWd = document.body.offsetWidth; 
	else if (window.innerWidth) winWd = window.innerWidth-18;
	return winWd;
}

date = new Date();
var mydate = date.getDay();
function getday()    { return document.write(weekdays[mydate]);}
function getquote()  { return document.write(quoteofday[mydate]);}
function getpicture(){ return document.write('<img src = "http://www.' + myDomain + '/Faces/small'+ mydate +'.jpg" height=150 width=113 border=0 >');}
function gettoplogo(){ return document.write('<img src = "http://www.' + myDomain + '/Background/top_logo_left.jpg" height = "95" width = "300" border = "0"><img src = "http://www.' + myDomain + '/Background/top_logo_middle.jpg" height = "95" width = "284" border = "0"><img src ="http://www.' + myDomain + '/Background/top_logo' + mydate + '.jpg" height = "95" width = "376" border = "0">');}
function gettopbar() { return document.write('<table class="plain" align = center valign = middle width="680" height=100% background = "http://www.' + myDomain + '/Background/topbar' + mydate + '.jpg">');}
function getbotbar() { return document.write('<table class="plain" align = center valign = middle width="680" height=100% background = "http://www.' + myDomain + '/Background/botbar' + mydate + '.jpg">');}
function gettitle()  { return document.write('<td height = "60" background = "http://www.' + myDomain + '/Background/title' + mydate + '.jpg" align = left class = "mytitle">');}
function getface()   { return document.write('<img src = "http://www.' + myDomain + '/Background/face' + mydate + '.jpg" height = "120" width = "280" border = "0">');}
function getchin()   { return document.write('<img src = "http://www.' + myDomain + '/Background/chin' + mydate + '.jpg" width = "280" height = "134" border = "0">');}
function gethbar()   { return document.write('<img src = "http://www.' + myDomain + '/Background/h_frame' + mydate + '.jpg" height = "10" width = "680" border = "0">');}
function getcorner() { return document.write('<img src = "http://www.' + myDomain + '/Background/topcorner' + mydate + '.jpg" width = "52" height = "132">');}
function mymail()    { return document.write('<a class = "mylincs" href = "mailto:' + myBox + '@' + myDomain + '" > ' + myTitle + '@' + myBoxTitle + '</a>');}
function my_mail(mypicture, mywidth, myheight, myvspace, myhspace, myalt, myborder) { 
   var mystyle = '" style = "width: ' + mywidth + '; height: ' + myheight + '; border: 0; margin: ' + myvspace + ' ' + myhspace + ' ' + myvspace +' '+ myhspace + ';"';
   if (myborder) mystyle = '" style = "width: ' + mywidth + '; height: ' + myheight + '; border: ' + myborder + ' solid blue; margin: ' + myvspace + ' ' + myhspace + ' ' + myvspace +' '+ myhspace + ';"';
   return document.write('<a href ="mailto:' + myBox + '@' + myDomain + '" ><img src ="http://www.' + myDomain + '/c_imag/' + mypicture + mystyle + 'alt = "' + myalt + '"></a>');
}

function disableSelection(target){
       if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
       else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	       target.style.MozUserSelect="none"
              else //All other route (ie: Opera)
	       target.onmousedown=function(){return false}
       target.style.cursor = "default"
}

