if (document.images)
 {
	  var addztagoff= new Image(173, 58);addztagoff.src="../image/add_tags_n.jpg"; var addztagon= new Image(173, 58);addztagon.src="../image/add_tags_f.jpg";
	  var viewztagoff= new Image(173, 58);viewztagoff.src="../image/view_tags_n.jpg"; var viewztagon= new Image(173, 58);viewztagon.src="../image/view_tags_f.jpg";
	  var reportoff= new Image(173, 58);reportoff.src="../image/report_lost_n.jpg"; var reporton= new Image(173, 58);reporton.src="../image/report_lost_f.jpg";
	  var viewlostoff= new Image(173, 58);viewlostoff.src="../image/view_lost_n.jpg"; var viewloston= new Image(173, 58);viewloston.src="../image/view_lost_f.jpg";
	  var viewopenoff= new Image(173, 58);viewopenoff.src="../image/view_open_n.jpg"; var viewopenon= new Image(173, 58);viewopenon.src="../image/view_open_f.jpg";
	  var settingsoff= new Image(173, 58);settingsoff.src="../image/settings_n.jpg"; var settingson= new Image(173, 58);settingson.src="../image/settings_f.jpg";
	  
	  var sifmoff= new Image(400, 30);	sifmoff.src="../image/2_send_insta_n.jpg"; 		var sifmon= new Image(400, 30);		sifmon.src="../image/2_send_insta_f.jpg";
	  var zcaseoff= new Image(400, 30);	zcaseoff.src="../image/2_openzcase_n.jpg"; 		var zcaseon= new Image(400, 30);	zcaseon.src="../image/2_openzcase_f.jpg";
	  var moremsgoff= new Image(400, 30);	moremsgoff.src="../image/2_details_n.jpg"; 		var moremsgon= new Image(400, 30);	moremsgon.src="../image/2_details_f.jpg";

	  var zhomeoff		= new Image(80, 35);	zhomeoff.src 		= "../image/zhome_n.jpg";
	  var zhomeon		= new Image(80, 35);	zhomeon.src		= "../image/zhome_f.jpg";
	  var zwhatoff		= new Image(80, 35);	zwhatoff.src 		= "../image/zwhat_n.jpg";
	  var zwhaton		= new Image(80, 35);	zwhaton.src		= "../image/zwhat_f.jpg";
	  var zownersoff	= new Image(80, 35);	zownersoff.src 		= "../image/zowners_n.jpg";
	  var zownerson		= new Image(80, 35);	zownerson.src		= "../image/zowners_f.jpg";
	  var zfindersoff	= new Image(80, 35);	zfindersoff.src 	= "../image/zfinders_n.jpg";
	  var zfinderson	= new Image(80, 35);	zfinderson.src		= "../image/zfinders_f.jpg";
	  var zsettingsoff	= new Image(80, 35);	zsettingsoff.src	= "../image/zsettings_n.jpg";
	  var zsettingson	= new Image(80, 35);	zsettingson.src		= "../image/zsettings_f.jpg";
	  var zsupportoff	= new Image(80, 35);	zsupportoff.src 	= "../image/zsupport_n.jpg";
	  var zsupporton	= new Image(80, 35);	zsupporton.src		= "../image/zsupport_f.jpg";
	  var zaboutoff		= new Image(80, 35);	zaboutoff.src 		= "../image/zabout_n.jpg";
	  var zabouton		= new Image(80, 35);	zabouton.src		= "../image/zabout_f.jpg";
	  var zpurchaseoff	= new Image(80, 35);	zpurchaseoff.src	= "../image/zpurchase_n.jpg";
	  var zpurchaseon	= new Image(80, 35);	zpurchaseon.src		= "../image/zpurchase_f.jpg";
	  var zsignonoff	= new Image(80, 35);	zsignonoff.src 		= "../image/zsignon_n.jpg";
	  var zsignonon		= new Image(80, 35);	zsignonon.src		= "../image/zsignon_f.jpg";
	  var zsignoffoff	= new Image(80, 35);	zsignoffoff.src 	= "../image/zsignoff_n.jpg";
	  var zsignoffon	= new Image(80, 35);	zsignoffon.src		= "../image/zsignoff_f.jpg";


}

function zSetF()
{
    setTimeout("document.getElementById('qmessage').focus();", 500);
}
function zSetFTag()
{
    setTimeout("document.getElementById('ztag').focus();", 500);
}
function zSetFBadzID()
{
    setTimeout("document.getElementById('zBadzID').focus();", 500);
}

function zSetFPass()
{
    setTimeout("document.getElementById('zPass').focus();", 500);
}

function validateaddzTag()
{

    if (addztag.zID.value.length < 9)
    {
	mesg = "zID numbers must be 9 digits in length\n";
	alert(mesg);
	addztag.zID.focus();
	return (false);
    }

    if (addztag.zDesc.value.length > 255)
    {
	mesg = "zTag Item Descriptions are limited to 255 characters\n";
	mesg = mesg + "You have entered " + addztag.zDesc.value.length + " character(s)\n";
	alert(mesg);
	addztag.zDesc.focus();
	return (false);
    }

    return (true);
};

function validatechangezTag()
{


    if (changeztag.zDesc.value.length > 255)
    {
	mesg = "zTag Item Descriptions are limited to 255 characters\n";
	mesg = mesg + "You have entered " + changeztag.zDesc.value.length + " character(s)\n";
	alert(mesg);
	changeztag.zDesc.focus();
	return (false);
    }

    return (true);
};

function validatelostzTag()
{

    if (lostzTag.zLostMsg.value.length > 512)
    {
	mesg = "Please limit your lost message to 512 characters\n";
	mesg = mesg + "You have entered " + lostzTag.zLostMsg.value.length + " character(s)\n";
	alert(mesg);
	lostzTag.zLostMsg.focus();
	return (false);
    }

    return (true);
};

function validateexplination()
{

    if (notlost.explain.value.length > 5120)
    {
	mesg = "Summary is limited to 5120 characters\n";
	mesg = mesg + "You have entered " + notlost.explain.value.length + " character(s)\n";
	alert(mesg);
	notlost.explain.focus();
	return (false);
    }

    return (true);
};

function validatequickmessage()
{

    if (sendquickmsg.qmsg.value.length > 5120)
    {
	mesg = "Insta-Found messages are limited to 5120 characters\n";
	mesg = mesg + "You have entered " + sendquickmsg.qmsg.value.length + " character(s)\n";
	alert(mesg);
	sendquickmsg.qmsg.focus();
	return (false);
    }

    return (true);
};

function validatezemail()
{

    if (sendemail.msg.value.length > 5120)
    {
	mesg = "Email messages sent from the website are limited to 5120 characters\n";
	mesg = mesg + "You have entered " + sendemail.msg.value.length + " character(s)\n";
	alert(mesg);
	sendemail.msg.focus();
	return (false);
    }

    return (true);
};

function valclose()
{

    if (closecase.isowner.value == "1" && !closecase.reason[0].checked && !closecase.reason[1].checked)
    {
	mesg = "As the owner you must mark this item either returned or permanently lost\n";
	alert(mesg);
	return (false);
    }
    if (closecase.explain.value.length > 5120)
    {
	mesg = "Email messages sent from the website are limited to 5120 characters\n";
	mesg = mesg + "You have entered " + closecase.explain.value.length + " character(s)\n";
	alert(mesg);
	closecase.explain.focus();
	return (false);
    }

    return (true);
};

function validateemailsupport()
{
    var reEmail1=/@/ ;
    var reEmail2=/./ ;


    if (emailsupport.email.value.search(reEmail1) == -1 || emailsupport.email.value.search(reEmail2) == -1)
    {
	mesg = "Please enter a valid email address";
	alert(mesg);
	emailsupport.email.focus();
	return (false);
    }
    if (emailsupport.subject.value == "none")
    {
	mesg = "Please chose a subject";
	alert(mesg);
	emailsupport.subject.focus();
	return (false);
    }
    if   (emailsupport.question.value.length > 5120)
    {
	mesg = "Please limit your question to to 5120 characters\n";
	mesg = mesg + "You have entered " + emailsupport.question.value.length + " character(s)\n";
	alert(mesg);
	emailsupport.question.focus();
	return (false);
    }

    return (true);
};


function validatetrouble()
{
    if (ztagsearch.zDesc.value.length > 1024)
    {
	mesg = "Please limit the description to 1024 characters\n";
	mesg = mesg + "You have entered " + ztagsearch.zDesc.value.length + " character(s)\n";
	alert(mesg);
	ztagsearch.zDesc.focus();
	return (false);
    }

    return (true);
};

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }

function validatequickmessage2()
{

    if (sendquickmsg.qmsg.value.length > 5120)
    {
	mesg = "Insta-Found messages are limited to 5120 characters\n";
	mesg = mesg + "You have entered " + sendquickmsg.qmsg.value.length + " character(s)\n";
	alert(mesg);
	sendquickmsg.qmsg.focus();
	return (false);
    }
    if (sendquickmsg.qmsg.value.length < 1)
    {
	mesg = "Your message cannot be blank";
	alert(mesg);
	sendquickmsg.qmsg.focus();
	return (false);
    }

    return (true);
};
