<!-- // Hide the following code from non-Javascript enabled browsers

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function checkme() // Define function checkme
{
/*    if (document.form[0].cityid.value == "0")
    {
    alert("Please select a city.");
    document.form[0].cityid.focus();return(false)
    }

    if (document.form[0].catid.value == "0")
    {
    alert("Please select a category.");
    document.form[0].catid.focus();return(false)
    }

    if (document.form[0].subcatid.value == "0")
    {
    alert("Please select a sub-category.");
    document.frmPost.subcatid.focus();return(false)
    }
*/
    if (document.frmPost.adtitle.value == "")
    {
    alert("The Title field is empty.  Please add more than one word.");
    document.frmPost.adtitle.focus();return(false)
    }

	if (document.forms[0].addesc.value == "")
    {
    alert("The Post field is empty.  Please add more than one word.");
    document.forms[0].addesc.focus();return(false)
    }
	
	if (document.frmPost.email.value == "")
    {
    alert("The Email field is empty.  Please fill out this field.");
    document.frmPost.email.focus();return(false)
    }
	
	if (document.frmPost.captcha.value == "")
    {
    alert("The Security Code field is empty.  Please fill out this field.");
    document.frmPost.captcha.focus();return(false)
    }
	
	if (document.frmPost.captcha.value != getCookie('xz_captcha_code'))
    {
    alert("The Security Code field is wrong.  Please try again.");
    document.frmPost.captcha.focus();return(false)
    }
	
    if (!document.frmPost.agree.checked)
    {
    alert("You must agree to the Term Agreement by checking the checkbox.");
    document.frmPost.agree.focus();return(false)
    }
}

var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
rX = self.pageXOffset;
rY = self.pageYOffset;
}
else if(document.documentElement && document.documentElement.scrollTop) {
rX = document.documentElement.scrollLeft;
rY = document.documentElement.scrollTop;
}
else if(document.body) {
rX = document.body.scrollLeft;
rY = document.body.scrollTop;
}
if(document.all) {
cX += rX;
cY += rY;
}
d.style.left = (cX-200) + "px";
d.style.top = (cY-300) + "px";
}
function Hide(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowText(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}
function Show(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
} 

function hideSelect(newState) {
	
	var elements = document.documentElement.getElementsByTagName('select');
 
	for (var i=0; i<elements.length; i++) {
		elements[i].style.visibility = newState;
	}
} 

function findObj(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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->