<!-- hide
///////////////////////////////////////////// Javascript Cookie Handler
function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}
///////////////////////////////////////////// Jump to URL
function jump(sss) {
	if (sss != "null") {
		document.location.href = sss;
	}
}
///////////////////////////////////////////// Submit Form
function submitform(sss) {
	if (sss!="") {
		document.getElementById(sss).submit();
	}
}
///////////////////////////////////////////// Clear Form Item
function clearme(sss) {
	if (sss.value == sss.defaultValue) {
		sss.value = "";
	}
}
///////////////////////////////////////////// Show/Hide Item
function toggle(sss) {
	if ( document.getElementById(sss).style.display != 'none' ) {
		document.getElementById(sss).style.display = 'none';
	}
	else {
		document.getElementById(sss).style.display = 'block';
	}
	document.body.style.overflow="auto";
}
///////////////////////////////////////////// Round Number
function roundno(num,dec) {
	var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
	return result;
}
///////////////////////////////////////////// currency formatting
function cformat(sss) {
	var i = parseFloat(sss);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}
///////////////////////////////////////////// AJAX Builder
var xmlHttp
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
function display() 
{ 
	var dname
	dname = document.getElementById("dname").value;
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("loaderholder").style.display="none";
		document.getElementById(dname).innerHTML=xmlHttp.responseText;
	}
}
function setdname(sss)
{
	document.getElementById("dname").value=sss;
	document.getElementById("loaderholder").style.display="block";
}
///////////////////////////////////////////// search
function searchme(sss) {
	var sss=document.getElementById("search").value
	if (sss.length>1) {
		if (document.getElementById('html')) {
			document.getElementById("html").innerHTML="<h1>Searching...</h1><p><img src=\"library/ajaxloader.gif\"></p>";
		}
		else if (document.getElementById('phtml')) {
			document.getElementById("phtml").innerHTML="<h1>Searching...</h1><p><img src=\"library/ajaxloader.gif\"></p>";
		}
		else if (document.getElementById('chtml')) {
			document.getElementById("chtml").innerHTML="<h1>Searching...</h1><p><img src=\"library/ajaxloader.gif\"></p>";
		}
		else if (document.getElementById('fphtml')) {
			document.getElementById("fphtml").innerHTML="<h1>Searching...</h1><p><img src=\"library/ajaxloader.gif\"></p>";
		}
		if(typeof sIFR == "function"){
			sIFR.replaceElement("h1", named({sFlashSrc: "includes/vagrounded.swf", sColor: "#444444", sWmode: "opaque" }));
		};
		xmlHttp=GetXmlHttpObject();
		var url="ajax.asp?act=search&term="+sss+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
}
function stateChanged() { 
	if (xmlHttp.readyState==4)	{ 
		if (document.getElementById('html')) {
			document.getElementById("html").innerHTML=xmlHttp.responseText;
		}
		else if (document.getElementById('phtml')) {
			document.getElementById("phtml").innerHTML=xmlHttp.responseText;
		}
		else if (document.getElementById('chtml')) {
			document.getElementById("chtml").innerHTML=xmlHttp.responseText;
		}
		else if (document.getElementById('fphtml')) {
			document.getElementById("fphtml").innerHTML=xmlHttp.responseText;
		}
		if(typeof sIFR == "function"){
			sIFR.replaceElement("h1", named({sFlashSrc: "includes/vagrounded.swf", sColor: "#444444", sWmode: "opaque" }));
		};
	}
}
///////////////////////////////////////////// something
function cr(rrr,sss,ttt) {
	if (rrr!="" && sss!="" && ttt!="") {
		document.getElementById(sss).innerHTML=eval(ttt-rrr.length);
	}
}
// end hide -->