// Standard form Functions Scripts
//
//
// Enables and Disables 'Order Imprint' button
// Proc.js has 'document.myForm.(ButtonName).disabled = true'
// Function Called from Album Qty & Album Desc
// onChange="ordImpX(x)'" 
// Imprint Button name IMPX / x= leading data element
//  Values =  1,2,3,4,5,6,7,8,9,A,B,C,D
//
function ordImpX (x) {
if( (document.myForm['Qty' + x].value >= "1") && (document.myForm['D' + x + '1'].options[document.myForm['D' + x + '1'].selectedIndex].value.length >= "3")) {
document.myForm['IMP' + x].disabled = false;
//alert("False");
}
else {
document.myForm['IMP' + x].disabled = true;
//alert("True");
}
}
//
// Used for Informing User of invalid Selection in Drop Down
// (Text Heading Descriptoins)
//
//  dat = datafield
//
//
function chkFldX (dat) {
    datFld1 = document.myForm[dat].options[document.myForm[dat].selectedIndex].value;
//alert(datFld1);
    sPos = 1000;
    colonPos = 0;         
    sPos = datFld1.indexOf(":",colonPos);
//alert(sPos);
    if (sPos == -1) {
        alert("Please make a valid selection");
        document.myForm[dat].selectedIndex = 0;
        document.myForm[dat].value = " ";
    }   
} 
//
//
// Page Footer
//
function tabFoot () {
footLine ="<p>&nbsp;&nbsp; &nbsp;&nbsp;<img border='0' src='images\/Mlogo.gif'";
footLine +="alt='Developed by MarTeeWebMan' width='155' height='49'>&nbsp;&nbsp;&nbsp;&nbsp;";
footLine +="<font FACE='Verdana,Arial' SIZE='1'><strong><br>";
footLine +="&nbsp;Copyright ©&nbsp;<br>";
footLine +="&nbsp;Nightingale Albums LLC.<br>";
footLine +="&nbsp;1998 - "
    today=new Date();
    y0=today.getFullYear();
footLine +=y0;
footLine +=" &nbsp;&nbsp;<br><br>";
footLine +="&nbsp;Email &nbsp;&nbsp;<br>";
footLine +="&nbsp;<a href='mailto:Info@nightingalealbums.com'>Info@nightingalealbums.com<\/a>"; 
//footLine +="&nbsp;<a href='mailto:Info@nightingalealbums.net'>Info@nightingalealbums.net<\/a>"; 
//footLine +="&nbsp;<a href='mailto:Info@nightingalealbums.biz'>Info@nightingalealbums.biz<\/a>"; 
footLine +="<\/strong><\/font><br>&nbsp;<br>&nbsp;<\/p>";
document.write(footLine);
}
//

//
// Check Boxes are used to indicate Pages & Mats Only
// ck1-ck6
// Input Box is used for the Album Pricing info
// T1-T6
// If the Check Box is checked, then T - Input is hidden
// 
//  Used for PH8x10, CB8x10, MD, and SM.
//
function ckBx1Det () {

if (document.myForm.ck1.checked ==  true) {
   document.myForm.T1.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T1.style.color ="#000080";
   }

}

function ckBx2Det () {

if (document.myForm.ck2.checked ==  true) {
   document.myForm.T2.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T2.style.color ="#000080";
   }

}

function ckBx3Det () {

if (document.myForm.ck3.checked ==  true) {
   document.myForm.T3.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T3.style.color ="#000080";
   }

}

function ckBx4Det () {

if (document.myForm.ck4.checked ==  true) {
   document.myForm.T4.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T4.style.color ="#000080";
   }

}

function ckBx5Det () {

if (document.myForm.ck5.checked ==  true) {
   document.myForm.T5.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T5.style.color ="#000080";
   }

}

function ckBx6Det () {

if (document.myForm.ck6.checked ==  true) {
   document.myForm.T6.style.color ="#FFFFFF";
   }
   else {
   document.myForm.T6.style.color ="#000080";
   }

}

//

