
// path the postal code variable to the english URL"kh"
function newLocation()
{
var my_parm;
my_parm = document.thisForm.the_Code.value;
window.location="http://apps.gm.ca/app/GMCanada/DealerLocatorList.do?nav=0&lang=en&SRCHTYPE=DEALERPOSTALCODE&POSTLST=&PROGRAMCD=&SRVCID_4=044&SELECTED_SERVICE=Goodwrench+Service&DEALER_SEARCH_LAYER_HIDDEN=&cmb_brand=0%7E0&cmb_service=044 &CITYNM=&POSTLST_CITY=&BANM=&POSTLST_DLRNM=&COUNT=1&ADV=GSPENWC006&POSTLCD="+my_parm;
}
// path the postal code variable to the french URL"kh"
function newLocationFR()
{
var my_parm;
my_parm = document.thisForm.the_Code.value;
window.location="http://apps.gm.ca/app/GMCanada/DealerLocatorList.do?nav=0&lang=fr&SRCHTYPE=DEALERPOSTALCODE&POSTLST=&PROGRAMCD=&SRVCID_4=044&SELECTED_SERVICE=Goodwrench+Service&DEALER_SEARCH_LAYER_HIDDEN=&cmb_brand=0%7E0&cmb_service=044 &CITYNM=&POSTLST_CITY=&BANM=&POSTLST_DLRNM=&COUNT=1&ADV=GSPFRWC006&POSTLCD="+my_parm;
}
 
// Expression to highlight the text box area
var highlightcolor="white"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}

//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}



