
// Protect Email
// ----------------------------------
function DESemail(emailname,emailserver) {
	document.write("<a href='mailto:" + emailname + "@" + emailserver +"'>");
	document.write(emailname + "@" + emailserver); 
	document.write("</a>"); 
}

// Accessible Pop Ups
// ----------------------------------
function DESopen(url,width,height,toolbar,scroll) {
	window.open(url, "", "scrollbars="+scroll+",toolbar="+toolbar+",height="+ height +",width="+width);
	return false;
}

// Random Images 1 (already on site)
// ----------------------------------
function DESrandomImages() {

  var j,d="",l="",m="",p="",q="",z="",KW_ARI= new Array()
  KW_ARI[KW_ARI.length]='/images/top1.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top2.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top3.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top4.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top5.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top6.jpg?&width=794&height=122';
  KW_ARI[KW_ARI.length]='/images/top7.jpg?&width=794&height=122';
  
  j=parseInt(Math.random()*KW_ARI.length);
  j=(isNaN(j))?0:j;
  if (KW_ARI[j].indexOf('?')==-1) {
    document.write("<img src='"+KW_ARI[j]+"'>");
  }
  else {
    nvp=KW_ARI[j].substring(KW_ARI[j].indexOf('?')+2).split('&');
    for(var i=0;i<nvp.length;i++) {
      sub=nvp[i].split('=');
   	  switch(sub[0]) {
 	    case 'link':
          l="<a href='"+unescape(sub[1])+"'>";
          p="</a>";
		  break;
	    case 'target':
          q=" target='"+unescape(sub[1])+"'";
  		  break;
  	    default:
          m+=" "+sub[0]+"='"+unescape(sub[1])+"'";
  		  break;
      }
    }
    z=(l!="")?((q!="")?l.substring(0,l.length-1)+q+">":l):"";
    z+="<img src='"+KW_ARI[j].substring(0,KW_ARI[j].indexOf('?'))+"'"+m+">"+p;
  document.write(z);
  }
}

// Random Images 2 (already on site)
// ----------------------------------
function DESrandomComments() {

// Advanced Random Images Start
// Copyright 2001-2002 All rights reserved, by Paul Davis - www.kaosweaver.com
  var j,d="",l="",m="",p="",q="",z="",KW_ARI= new Array()
  KW_ARI[KW_ARI.length]='/images/comment1.gif?&width=254&height=107';
  KW_ARI[KW_ARI.length]='/images/comment2.gif?&width=229&height=134';
  KW_ARI[KW_ARI.length]='/images/comment3.gif?&width=257&height=142';
  KW_ARI[KW_ARI.length]='/images/comment4.gif?&width=234&height=135';
  KW_ARI[KW_ARI.length]='/images/comment5.gif?&width=246&height=122';
  j=parseInt(Math.random()*KW_ARI.length);
  j=(isNaN(j))?0:j;
  if (KW_ARI[j].indexOf('?')==-1) {
    document.write("<img src='"+KW_ARI[j]+"'>");
  }
  else {
    nvp=KW_ARI[j].substring(KW_ARI[j].indexOf('?')+2).split('&');
    for(var i=0;i<nvp.length;i++) {
      sub=nvp[i].split('=');
   	  switch(sub[0]) {
 	    case 'link':
          l="<a href='"+unescape(sub[1])+"'>";
          p="</a>";
		  break;
	    case 'target':
          q=" target='"+unescape(sub[1])+"'";
  		  break;
  	    default:
          m+=" "+sub[0]+"='"+unescape(sub[1])+"'";
  		  break;
      }
    }
    z=(l!="")?((q!="")?l.substring(0,l.length-1)+q+">":l):"";
    z+="<img src='"+KW_ARI[j].substring(0,KW_ARI[j].indexOf('?'))+"'"+m+">"+p;
  document.write(z);
  }

}