function emailMask(end,middle,start,subject){
	var one ='mai';
	var two='lto:';
	var three='?Subject=';
	var putogether= one+two+start+middle+end+three+subject;
	document.location.href=eval('"'+putogether+'"');
	window.status=putogether;
}

function newWin(url,title,w,h,scrl,getFocus){ 
	var win = null; 
	LeftPos = (screen.width) ? parseInt((screen.width-w)/2) : 0; 
	TopPos = (screen.height) ? parseInt((screen.height-h)/2) : 0; 
	settings = 'height='+h+',width='+w+',top='+TopPos+',left='+LeftPos+',scrollbars='+scrl+',resizable=no' ;
	win = window.open(url,title,settings) ;
	if (getFocus) {
		
		win.focus();
	}else{
		
		self.focus();
	}

}

function close_window() {
  //  self.close();
}

function s(r, g, b, el) {
    d=document;hr=r.toString(16);hg=g.toString(16);hb=b.toString(16);
	hr=(hr.length==1)?"0"+hr:hr;hg=(hg.length==1)?"0"+hg:hg;hb=(hb.length==1)?"0"+hb:hb;
	if (d.getElementById){
		d.getElementById(el).style.color="#"+hr+hg+hb;
	}
}

function c(a,b,s,i) { 
	return Math.floor(a*((s-i)/s)+b*(i/s)) 
}

function fade(r,g,b,e,n,l,s,o){
    for(i=0;i<=s;i++){
		setTimeout("s("+c(r,e,s,i)+","+c(g,n,s,i)+","+c(b,l,s,i)+",'"+o+"');",i*s);
	}
}

function addToFavorites(){ 
var url = "http://www.loudmike.com"; 
var pName = "loudmike.com";
	if (window.external){ 
		window.external.AddFavorite(url,pName) 
	} 
} 
function makeTimeStamp() {
	pcdateobject=new Date();
	timestamp=pcdateobject.getTime();
	return timestamp.toString();
}
function replaceSubstring(inputString, fromString, toString) {
   // Goes through the inputString and replaces every occurrence of fromString with toString
   var temp = inputString;
   if (fromString == "") {
      return inputString;
   }
   if (toString.indexOf(fromString) == -1) { // If the string being replaced is not a part of the replacement string (normal situation)
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } else { // String being replaced is part of replacement string (like "+" being replaced with "++") - prevent an infinite loop
      var midStrings = new Array("~", "`", "_", "^", "#");
      var midStringLen = 1;
      var midString = "";
      // Find a string that doesn't exist in the inputString to be used
      // as an "inbetween" string
      while (midString == "") {
         for (var i=0; i < midStrings.length; i++) {
            var tempMidString = "";
            for (var j=0; j < midStringLen; j++) { tempMidString += midStrings[i]; }
            if (fromString.indexOf(tempMidString) == -1) {
               midString = tempMidString;
               i = midStrings.length + 1;
            }
         }
      } // Keep on going until we build an "inbetween" string that doesn't exist
      // Now go through and do two replaces - first, replace the "fromString" with the "inbetween" string
      while (temp.indexOf(fromString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(fromString));
         var toTheRight = temp.substring(temp.indexOf(fromString)+fromString.length, temp.length);
         temp = toTheLeft + midString + toTheRight;
      }
      // Next, replace the "inbetween" string with the "toString"
      while (temp.indexOf(midString) != -1) {
         var toTheLeft = temp.substring(0, temp.indexOf(midString));
         var toTheRight = temp.substring(temp.indexOf(midString)+midString.length, temp.length);
         temp = toTheLeft + toString + toTheRight;
      }
   } // Ends the check to see if the string being replaced is part of the replacement string or not
   return temp; // Send the updated string back to the user
}


// Takes a url like "http://www.example.com:81/" and returns "www.example.com:81"
function cleanBaseHref(baseHrefIn){ 
	baseHrefOut = baseHrefIn;
	baseHrefOut =  replaceSubstring(baseHrefOut, "http://", "");
	baseHrefOut =  replaceSubstring(baseHrefOut, "/", "");	
	return escape(baseHrefOut);
}	

//document.write(cleanBaseHref('http://www.loudmike.com'))

function BrowserCheck() {
	var b = navigator.appName;
	if (b == "Netscape") {
		this.b = "ns";
	}else if (b == "Microsoft Internet Explorer"){
		this.b = "ie";
	}else{ 
		this.b   = b;
	}
	this.version = navigator.appVersion;
	this.v = parseInt(this.version);
	this.ns4 = (this.b == "ns" && this.v == 4);
	this.ns6 = (this.b == "ns" && (this.v == 5 || this.v == 6));
	this.ie = (this.b == "ie" && this.v >= 4);
}




