n201off=new Image(150,20);
n201off.src="http://www.logangraphic.com/i/n-201-off.gif";
n201on=new Image(150,20);
n201on.src="http://www.logangraphic.com/i/n-201-over.gif";
n202off=new Image(150,20);
n202off.src="http://www.logangraphic.com/i/n-202-off.gif";
n202on=new Image(150,20);
n202on.src="http://www.logangraphic.com/i/n-202-over.gif";

n204off=new Image(150,20);
n204off.src="http://www.logangraphic.com/i/n-204-off.gif";
n204on=new Image(150,20);
n204on.src="http://www.logangraphic.com/i/n-204-over.gif";
n205off=new Image(150,20);
n205off.src="http://www.logangraphic.com/i/n-205-off.gif";
n205on=new Image(150,20);
n205on.src="http://www.logangraphic.com/i/n-205-over.gif";
n206off=new Image(150,20);
n206off.src="http://www.logangraphic.com/i/n-206-off.gif";
n206on=new Image(150,20);
n206on.src="http://www.logangraphic.com/i/n-206-over.gif";
n207off=new Image(150,20);
n207off.src="http://www.logangraphic.com/i/n-207-off.gif";
n207on=new Image(150,20);
n207on.src="http://www.logangraphic.com/i/n-207-over.gif";
n208off=new Image(150,20);
n208off.src="http://www.logangraphic.com/i/n-208-off.gif";
n208on=new Image(150,20);
n208on.src="http://www.logangraphic.com/i/n-208-over.gif";
n209off=new Image(150,20);
n209off.src="http://www.logangraphic.com/i/n-209-off.gif";
n209on=new Image(150,20);
n209on.src="http://www.logangraphic.com/i/n-209-over.gif";

n211off=new Image(150,20);
n211off.src="http://www.logangraphic.com/i/n-211-off.gif";
n211on=new Image(150,20);
n211on.src="http://www.logangraphic.com/i/n-211-over.gif";
n212off=new Image(150,20);
n212off.src="http://www.logangraphic.com/i/n-212-off.gif";
n212on=new Image(150,20);
n212on.src="http://www.logangraphic.com/i/n-212-over.gif";
n213off=new Image(150,20);
n213off.src="http://www.logangraphic.com/i/n-213-off.gif";
n213on=new Image(150,20);
n213on.src="http://www.logangraphic.com/i/n-213-over.gif";
n214off=new Image(150,20);
n214off.src="http://www.logangraphic.com/i/n-214-off.gif";
n214on=new Image(150,20);
n214on.src="http://www.logangraphic.com/i/n-214-over.gif";

n216off=new Image(150,20);
n216off.src="http://www.logangraphic.com/i/n-216-off.gif";
n216on=new Image(150,20);
n216on.src="http://www.logangraphic.com/i/n-216-over.gif";
n217off=new Image(150,20);
n217off.src="http://www.logangraphic.com/i/n-217-off.gif";
n217on=new Image(150,20);
n217on.src="http://www.logangraphic.com/i/n-217-over.gif";
n218off=new Image(150,20);
n218off.src="http://www.logangraphic.com/i/n-218-off.gif";
n218on=new Image(150,20);
n218on.src="http://www.logangraphic.com/i/n-218-over.gif";
n219off=new Image(150,20);
n219off.src="http://www.logangraphic.com/i/n-219-off.gif";
n219on=new Image(150,20);
n219on.src="http://www.logangraphic.com/i/n-219-over.gif";

n298off=new Image(150,20);
n298off.src="http://www.logangraphic.com/i/n-298-off.gif";
n298on=new Image(150,20);
n298on.src="http://www.logangraphic.com/i/n-298-over.gif";
n299off=new Image(150,20);
n299off.src="http://www.logangraphic.com/i/n-299-off.gif";
n299on=new Image(150,20);
n299on.src="http://www.logangraphic.com/i/n-299-over.gif";


h02off=new Image(267,44);
h02off.src="http://www.logangraphic.com/i/home-2009-n-102.jpg";
h02on=new Image(267,44);
h02on.src="http://www.logangraphic.com/i/home-2009-n-102-over.jpg";
h03off=new Image(267,44);
h03off.src="http://www.logangraphic.com/i/home-2009-n-103.jpg";
h03on=new Image(267,44);
h03on.src="http://www.logangraphic.com/i/home-2009-n-103-over.jpg";
h04off=new Image(267,44);
h04off.src="http://www.logangraphic.com/i/home-2009-n-104.jpg";
h04on=new Image(267,44);
h04on.src="http://www.logangraphic.com/i/home-2009-n-104-over.jpg";
h05off=new Image(267,44);
h05off.src="http://www.logangraphic.com/i/home-2009-n-105.jpg";
h05on=new Image(267,44);
h05on.src="http://www.logangraphic.com/i/home-2009-n-105-over.jpg";
h06aoff=new Image(267,44);
h06aoff.src="http://www.logangraphic.com/i/home-2009-n-106a.jpg";
h06aon=new Image(267,44);
h06aon.src="http://www.logangraphic.com/i/home-2009-n-106a-over.jpg";
h07off=new Image(267,44);
h07off.src="http://www.logangraphic.com/i/home-2009-n-107a.jpg";
h07on=new Image(267,44);
h07on.src="http://www.logangraphic.com/i/home-2009-n-107a-over.jpg";


function flipper(ExistingImageName,NewImageName){
    if (document.images)
    document.images[ExistingImageName].src=eval(NewImageName+".src")
}


function validateSearch(){
    var temp
    if (document.search.query.value==""){
        alert("Tell me what to search for by typing in the white box by the SEARCH button. Thank you!")
        return false
    }
    return true
}


function checkFocus(entry){
    entry.value="";
}


function validate(){
    var temp
    if (document.contact.firstname.value==""){
        alert("Please enter your first name.")
        return false
    }
    if (document.contact.lastname.value==""){
        alert("Please enter your last name.")
        return false
    }
    if (document.contact.company.value==""){
        alert("Please enter your company name.")
        return false
    }
    if (document.contact.email.value==""){
        alert("Please enter your email address.")
        return false
    }
    return true
}


function clearText(thefield) {
    if (thefield.value==thefield.defaultValue)
    thefield.value = ""
} 


function replaceText(thefield) {
    if (thefield.value=="")
    thefield.value = thefield.defaultValue
} 


function goUS(clickedonmap){ 
    var thestate = document.letsgoUS.stateUS.options[document.letsgoUS.stateUS.selectedIndex].value
    document.letsgoUS.stateUS.value = ""
    if (thestate == '') {
        var thestate = clickedonmap
    }
    var wheretogo = "http://www.logangraphic.com/buy/results.shtml?" + thestate
    location = wheretogo
}
function goCA(clickedonmap){ 
    var thestate = document.letsgoCA.stateCA.options[document.letsgoCA.stateCA.selectedIndex].value
    document.letsgoCA.stateCA.value = ""
    if (thestate == '') {
        var thestate = clickedonmap
    }
    var wheretogo = "http://www.logangraphic.com/buy/results.shtml?Canada-" + thestate
    location = wheretogo
}


/* begin spam killer */
function CedarockKS(JC0,handler) {  /* "KS" = kill spam */
    var JC1 = "logangraphic"            /* this is the "do" in "do.us" */
    var JC2 = "com"                 /* this is the "us" in "do.us" */
    if (handler=="mto") {           /* write mail to only */
        document.write("<a href=\"mai")
        document.write("lto:"+JC0+"@")
        document.write(JC1+"."+JC2+"\">")
    }
    if (handler=="add") {           /* write address only */
        document.write(JC0+"@")
        document.write(JC1+"."+JC2)
    }
    if (handler=="all") {           /* write mail to and address */
        document.write("<a href=\"mai")
        document.write("lto:"+JC0+"@")
        document.write(JC1+"."+JC2+"\">")
        document.write(JC0+"@")
        document.write(JC1+"."+JC2)
        document.write("</a>")
    }
    return true
}
/* end of spam killer */



function ValidateContactOne() {
    /* VALIDATE REQUIRED FIELDS */
    if (document.contact.help.value=="select..."){
        alert("Please choose a way we can help you.")
        return false
    }
    if (document.contact.help.value==""){
        alert("Please choose a way we can help you.")
        return false
    }
    win24=window.open('','pagetwo','menubar=1,toolbar=0,resizable=1,scrollbars=1,width=500,height=500,left=50,top=50')
    win24.moveTo(screen.width/2-250,screen.height/2-250);
    return true
}


function ValidateContactTwo(f) {

    /* DISABLE THE SUBMIT BUTTON AFTER FIRST CLICK */
    function Localize(NewText){
        return NewText;
    }
    var ButtonText = Localize("Submitting...");
    var submissions=0;
    function Submitting(f){
        f.go.value=ButtonText;
        f.go.disabled=true;
        if (submissions==0)f.submit();
        submissions++;
        /* SHOW "STAND BY" IMAGE */
        flipper('sub1','subon')
        return true
    }
    /* VALIDATE REQUIRED FIELDS */
    var emailStr=document.contact2.email.value

    /* VERIFY EMAIL ADDRESS IS VALID */
    var emailPat=/^(.+)@(.+)$/
    var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
    var validChars="\[^\\s" + specialChars + "\]"
    var quotedUser="(\"[^\"]*\")"
    var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
    var atom=validChars + '+'
    var word="(" + atom + "|" + quotedUser + ")"
    var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
    var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
    var matchArray=emailStr.match(emailPat)
    if (matchArray==null) {
        var JC1 = confirm("Email address seems incorrect (check @ and .'s). Submit anyway?")
        if (!JC1) {return false}
        Submitting(f)
    }
    var user=matchArray[1]
    var domain=matchArray[2]
    if (user.match(userPat)==null) {
        var JC2 = confirm("Email address seems incorrect (username doesn't seem to be valid). Submit anyway?")
        if (!JC2) {return false}
        Submitting(f)
    }
    var IPArray=domain.match(ipDomainPat)
    if (IPArray!=null) {
        for (var i=1;i<=4;i++) {
            if (IPArray[i]>255) {
                var JC3 = confirm("Email address seems incorrect (destination IP address is invalid). Submit anyway?")
                if (!JC3) {return false}
                Submitting(f)
            }
        }
        return true
    }
    var domainArray=domain.match(domainPat)
    if (domainArray==null) {
        var JC4 = confirm("Email address seems incorrect (domain name doesn't seem to be valid). Submit anyway?")
        if (!JC4) {return false}
        Submitting(f)
    }
    var atomPat=new RegExp(atom,"g")
    var domArr=domain.match(atomPat)
    var len=domArr.length
    if (domArr[domArr.length-1].length<2 || 
        domArr[domArr.length-1].length>4) {
        var JC5 = confirm("Email address seems incorrect (address must end in a two, three, or four letter domain). Submit anyway?")
        if (!JC5) {return false}
        Submitting(f)
    }
    if (len<2) {
        var errStr="Email address seems incorrect (missing a complete hostname). Submit anyway?"
        var JC6 = confirm(errStr)
        if (!JC6) {return false}
        Submitting(f)
    }
    /* SET COOKIE FOR EMAIL TEST */
    document.contact2.emailtest.value = "valid"
    document.cookie = "CedarockValidate=valid"
    Submitting(f)
}



/* start of CVfeedback */
function CVfeedback() {
    for(i=0; i<document.contact.elements.length; i++) {
        if ((document.contact.elements[i].type != "submit") && (document.contact.elements[i].type != "checkbox") && (document.contact.elements[i].type != "radio") && (document.contact.elements[i].type != "textarea")) {
            document.contact.elements[i].className = "fieldfeedback";
        }
    }
    JCerror = false;
    if (document.contact.verifytext.value == "") {
        document.contact.verifytext.className = "fieldfeedbackerror";
        document.contact.verifytext.focus();
        JCerror = true;
    }
    if (document.contact.email.value == "") {
        document.contact.email.className = "fieldfeedbackerror";
        document.contact.email.focus();
        JCerror = true;
    }
    if (document.contact.name.value == "") {
        document.contact.name.className = "fieldfeedbackerror";
        document.contact.name.focus();
        JCerror = true;
    }


    var JCsuccess = false;
    document.getElementById("satisfyValue").innerHTML = "<font color=\"000000\">Value</font>";
    for (counter = 0; counter < contact.value.length; counter++) {
        if (contact.value[counter].checked) {JCsuccess = true;}
    }
    if (!JCsuccess) {
        document.getElementById("satisfyValue").innerHTML = "<font color=\"CC0000\"><b>Value</b></font>";
        JCerror = true;
    }


    var JCsuccess = false;
    document.getElementById("satisfyQuality").innerHTML = "<font color=\"000000\">Quality</font>";
    for (counter = 0; counter < contact.quality.length; counter++) {
        if (contact.quality[counter].checked) {JCsuccess = true;}
    }
    if (!JCsuccess) {
        document.getElementById("satisfyQuality").innerHTML = "<font color=\"CC0000\"><b>Quality</b></font>";
        JCerror = true;
    }


    var JCsuccess = false;
    document.getElementById("satisfyInstructions").innerHTML = "<font color=\"000000\">Instructions</font>";
    for (counter = 0; counter < contact.instructions.length; counter++) {
        if (contact.instructions[counter].checked) {JCsuccess = true;}
    }
    if (!JCsuccess) {
        document.getElementById("satisfyInstructions").innerHTML = "<font color=\"CC0000\"><b>Instructions</b></font>";
        JCerror = true;
    }


    var JCsuccess = false;
    document.getElementById("satisfyUse").innerHTML = "<font color=\"000000\">Ease of Use</font>";
    for (counter = 0; counter < contact.ease.length; counter++) {
        if (contact.ease[counter].checked) {JCsuccess = true;}
    }
    if (!JCsuccess) {
        document.getElementById("satisfyUse").innerHTML = "<font color=\"CC0000\"><b>Ease of Use</b></font>";
        JCerror = true;
    }


    var JCsuccess = false;
    document.getElementById("satisfyPerception").innerHTML = "<font color=\"000000\">Overall Perception</font>";
    for (counter = 0; counter < contact.perception.length; counter++) {
        if (contact.perception[counter].checked) {JCsuccess = true;}
    }
    if (!JCsuccess) {
        document.getElementById("satisfyPerception").innerHTML = "<font color=\"CC0000\"><b>Overall Perception</b></font>";
        JCerror = true;
    }


    if (document.contact.price.selectedIndex == 0) {
        document.contact.price.className = "fieldfeedbackerror";
        document.contact.price.focus();
        JCerror = true;
    }
    if (document.contact.how.selectedIndex == 0) {
        document.contact.how.className = "fieldfeedbackerror";
        document.contact.how.focus();
        JCerror = true;
    }
    if (document.contact.where.value == "") {
        document.contact.where.className = "fieldfeedbackerror";
        document.contact.where.focus();
        JCerror = true;
    }
    if (document.contact.product.value == "") {
        document.contact.product.className = "fieldfeedbackerror";
        document.contact.product.focus();
        JCerror = true;
    }
    if (JCerror == true) {
        alert("Please provide all required information.  Thank you.");
        return false;
    }
    if (document.contact.email.value != "") {
        document.contact.emailtest.value = "valid";
        document.cookie = "CedarockValidate=valid";
    }
    return true;
}
/* end of CVfeedback */

