/=====================================================//
function gotoURL(url){
  document.location = url;
}
//**********************************************************************************
function OnFocusKeyword( TextObj ) 
{ 
  if ( TextObj.value == "keyword search" )
  {
    TextObj.value = ""
  }
}

//**********************************************************************************
function OnBlurKeyword( TextObj ) 
{ 
  if ( TextObj.value == "" )
  {
    TextObj.value = "keyword search"
  }
}
//**********************************************************************************
function searchSubCategory(Obj, Link)
{ 
  TextValue = Obj.options[Obj.selectedIndex].value;
  if (TextValue == '') return;
  document.location = Link + TextValue;
}

//**********************************************************************************
function printShelf() {
   var frmObj = document.forms["GoRecord"];
   frmObj.action = "Index.php?_function=shelfListPrint";
   frmObj.target = "printShelf";

   w = 700;
   h = 600;
   windowString = "height=" + h + ",width=" + w + ",scrollbars=yes," +
                  "resizable=yes,left=" + (screen.width-w)/2 + ",top=" + 
                  (screen.height-h)/2
   wind = window.open( "" , "printShelf", windowString);
   frmObj.submit();
} 

//**********************************************************************************
function emailShelfForm() {
   var frmObj = document.forms["GoRecord"];
   frmObj.action = "Index.php?_function=Shelf&_subFunction=emailForm";
   frmObj.submit();
} 

//**********************************************************************************
function emailShelf() {
   var frmObj  = document.forms["GoRecord"];
   var emailTo = document.forms["EmailForm"].elements["email"].value;
   var emailCC = document.forms["EmailForm"].elements["emailCC"].value;
   frmObj.action = "Index.php?_function=Shelf&_subFunction=emailList&email=" + emailTo + "&emailCC=" + emailCC;
   frmObj.submit();
} 

//**********************************************************************************
function openWindowExecutiveProfile(ExecutiveName) {
   URL = "AboutUs/OurPeopleProfilePopup.php?ExecutiveName=" + ExecutiveName;
   var w = 570;
   var h = 300;
   windowString = "height=" + h + ",width=" + w + ",scrollbars=yes," +
                  "resizable=yes,left=" + (screen.width-w)/2 + ",top=" + 
                  (screen.height-h)/2;
   wind = window.open( URL, "", windowString);
 

} 

//**********************************************************************************
function updateCart(loggedIn)
{  
  if (loggedIn == 1){
    document.forms['UpdateCart'].target = 'cartFrame'
    document.forms['UpdateCart'].submit();
    document.SortList.submit();
    document.SortList.submit();
  } else {
    document.forms['UpdateCart'].target = ''
    document.forms['UpdateCart'].submit();
  }  	
} // end function PrintList()

//**********************************************************************************
function checkValue1(checkBoxName)
{  
  fldType = checkBoxName.substr(0,3);
  fldID   = checkBoxName.substr(4);
  fldBuy  = "Buy_" + fldID  ;
  fldRes  = "Res_" + fldID  ;
  
  if (fldType == "Buy" && eval("document.forms['UpdateCart']." + fldRes + ".checked") == true){
    alert("You can only select ORDER or RESERVE");
    return false;
  }  	
  
  if (fldType == "Res" && eval("document.forms['UpdateCart']." + fldBuy + ".checked") == true){
    alert("You can only select ORDER or RESERVE");
    return false;
  }  	
  
} // end function PrintList()

