<!-- 
var p80 = "http://www.port80software.com";
function checkurl(u)
{
	var invalid = -1;
	var url = String(u);
	url = parsedomain( url );
	invalid = url.search(/<>;/);

	if( (url == "") || (url == "TypeURL") ||  (invalid != -1) ) {
		alert("Please enter a valid URL.");
		return false;
	} else if( (url.indexOf("://") != -1) && (url.indexOf("http:") == -1) ) {
		alert("Non-HTTP protocols not supported.");
		return false;
	}
	return true;
}

function Tool_TestYourSite(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/testyoursite.asp?url="+escape(url), 760, 600);
}

/***** For ServerMask Tools *****/
function Tool_ServerMask(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/headercheck.asp?url="+escape(url), 700, 585);
}


/***** For CustomError Tools *****/
function Tool_CustomError(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/errorcheck.asp?url="+escape(url), 790, 560);
}


/***** For CacheRight Tools *****/
function Tool_CacheRight(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/cachecheck.asp?url="+escape(url), 760, 575);
}

/***** For httpZip Tools *****/
function Tool_httpZip(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/compresscheck.asp?url="+escape(url), 600, 640);
}
function Tool_httpZipBSC()
{
	open_window_scrolling(p80+"/tools/bandwidthcalcHZ", 660, 640);
}

/***** For ZipEnable Tools *****/
function Tool_ZipEnable(url)
{
	if( checkurl(url) ) open_window(p80+"/tools/compresscheck?url="+escape(url), 600, 640);
}
function Tool_ZipEnableBSC()
{
	open_window_scrolling(p80+"/tools/bandwidthcalcZE", 660, 660);
}



function Tool_CompressArchive(url,month,year)
{
	open_window(p80+"/tools/compressarchive?url="+escape(url)+"&m="+month+"&y="+year, 500, 600);
}

function Tool_HeaderCheckArchive(url,month,year)
{
	open_window(p80+"/tools/headerarchive?url="+escape(url)+"&m="+month+"&y="+year, 700, 500);
}

function emailfriend(url)
{
	open_window(p80+"/support/tools/emailfriend.asp?url="+escape(url), 500, 350);
}

function cache_details_open(filename)
{
	/* initialize variables*/
	var file = filename;
	NewWindow = window.open(file, "","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,copyhistory=0,width=620,height=250");
}


/***** For URLSpellCheck Tools *****/
function Tool_URLSpellCheck(test)
{
	test = ""+test;
	var file = (test=="undefined") ? "/tools/URLSpellCheck.asp" : "/tools/URLSpellCheck.asp?page="+test;
	open_window(p80+file, 800, 625);
}



/***** General *****/
function parsedomain( pd_url )
{
	var pd_url = pd_url.replace(/.*\:\/\//i,"");
	pd_url = pd_url.replace(/\?.*$/g, "");
	pd_url = pd_url.replace(/\/.*$/g,"");
	pd_url = pd_url.replace(/[^a-zA-Z0-9\-\.]/g, "");
	return pd_url;
}

// --> 


