    ns4 = (document.layers)? true:false
    ie4 = (document.all)? true:false

//handle netscape resize weirdness
if(ns4)
   {
     widthCheck = window.innerWidth
     heightCheck = window.innerHeight
     window.onresize = resizeFix
   }
function resizeFix()
{
   if(widthCheck != window.innerWidth || heightCheck != window.innerHeight)
   {
     window.location.reload(true)
   }
}

    // Load rollover images
    feature1on = new Image();          
    feature1on.src = "img/snav/1_" + curPage + "1_" + curVehicle + "_on.jpg"; 
    feature2on = new Image();          
    feature2on.src = "img/snav/2_" + curPage + "2_" + curVehicle + "_on.jpg"; 
    feature3on = new Image();          
    feature3on.src = "img/snav/3_" + curPage + "3_" + curVehicle + "_on.jpg"; 
    feature4on = new Image();          
    feature4on.src = "img/snav/4_" + curPage + "4_" + curVehicle + "_on.jpg"; 
    feature5on = new Image();          
    feature5on.src = "img/snav/5_" + curPage + "5_" + curVehicle + "_on.jpg"; 
    feature6on = new Image();          
    feature6on.src = "img/snav/6_" + curPage + "6_" + curVehicle + "_on.jpg"; 
    feature7on = new Image();          
    feature7on.src = "img/snav/7_" + curPage + "7_" + curVehicle + "_on.jpg"; 
    feature8on = new Image();          
    feature8on.src = "img/snav/8_" + curPage + "8_" + curVehicle + "_on.jpg"; 
    feature9on = new Image();          
    feature9on.src = "img/snav/9_" + curPage + "9_" + curVehicle + "_on.jpg"; 
    feature10on = new Image();          
    feature10on.src = "img/snav/10_" + curPage + "10_" + curVehicle + "_on.jpg"; 
    
    feature1off = new Image();          
    feature1off.src = "img/snav/1_" + curPage + "1_" + curVehicle + "_off.jpg"; 
    feature2off = new Image();          
    feature2off.src = "img/snav/2_" + curPage + "2_" + curVehicle + "_off.jpg"; 
    feature3off = new Image();          
    feature3off.src = "img/snav/3_" + curPage + "3_" + curVehicle + "_off.jpg"; 
    feature4off = new Image();          
    feature4off.src = "img/snav/4_" + curPage + "4_" + curVehicle + "_off.jpg"; 
    feature5off = new Image();          
    feature5off.src = "img/snav/5_" + curPage + "5_" + curVehicle + "_off.jpg"; 
    feature6off = new Image();          
    feature6off.src = "img/snav/6_" + curPage + "6_" + curVehicle + "_off.jpg"; 
    feature7off = new Image();          
    feature7off.src = "img/snav/7_" + curPage + "7_" + curVehicle + "_off.jpg"; 
    feature8off = new Image();          
    feature8off.src = "img/snav/8_" + curPage + "8_" + curVehicle + "_off.jpg"; 
    feature9off = new Image();          
    feature9off.src = "img/snav/9_" + curPage + "9_" + curVehicle + "_off.jpg"; 
    feature10off = new Image();          
    feature10off.src = "img/snav/10_" + curPage + "10_" + curVehicle + "_off.jpg"; 

    global1on = new Image();          
    global1on.src = "/img/top_nav1_on.gif"; 
    global3on = new Image();          
    global3on.src = "/img/top_nav3_on.gif"; 
    global4on = new Image();          
    global4on.src = "/img/top_nav4_on.gif"; 
    global5on = new Image();          
    global5on.src = "/img/top_nav5_on.gif"; 

    global1off = new Image();          
    global1off.src = "/img/top_nav1_off.gif"; 
    global3off = new Image();          
    global3off.src = "/img/top_nav3_off.gif"; 
    global4off = new Image();          
    global4off.src = "/img/top_nav4_off.gif"; 
    global5off = new Image();          
    global5off.src = "/img/top_nav5_off.gif"; 

    help1off = new Image();          
    help1off.src = "/img/help_getanswers_off.gif"; 
    help2off = new Image();          
    help2off.src = "/img/tech_go-to_off.gif"; 
    
    help1on = new Image();          
    help1on.src = "/img/help_getanswers_on.gif";
    help2on = new Image();          
    help2on.src = "/img/tech_go-to_on.gif"; 
    
    specs1on = new Image();          
    specs1on.src = "/img/specs/standard_features_on.gif"; 
    specs2on = new Image();          
    specs2on.src = "/img/specs/optional_features_on.gif"; 
    specs3on = new Image();          
    specs3on.src = "/img/specs/eng_trans_on.gif"; 
    specs4on = new Image();          
    specs4on.src = "/img/specs/dimensions_on.gif"; 
    specs5on = new Image();          
    specs5on.src = "/img/specs/full_specs_on.gif"; 

    specs1off = new Image();          
    specs1off.src = "/img/specs/standard_features_off.gif"; 
    specs2off = new Image();          
    specs2off.src = "/img/specs/optional_features_off.gif"; 
    specs3off = new Image();          
    specs3off.src = "/img/specs/eng_trans_off.gif"; 
    specs4off = new Image();          
    specs4off.src = "/img/specs/dimensions_off.gif"; 
    specs5off = new Image();          
    specs5off.src = "/img/specs/full_specs_off.gif"; 

    getanswersoff = new Image();          
    getanswersoff.src = "/img/help_getanswers_off.gif"; 
    getanswerson = new Image();          
    getanswerson.src = "/img/help_getanswers_on.gif"; 

    leftNavoff = new Image();          
    leftNavoff.src = "/img/nav_off.gif"; 
    leftNavon = new Image();          
    leftNavon.src = "/img/nav_on.gif"; 
    
    promoButtonoff = new Image();          
    promoButtonoff.src = "/promos/promobutton_off.gif"; 
    promoButtonon = new Image();          
    promoButtonon.src = "/promos/promobutton_on.gif"; 
 
    // Format Date
    function format_date() {
    var CalMonths = new Array(13);
	CalMonths[1] = "January";
	CalMonths[2] = "February";
	CalMonths[3] = "March";
	CalMonths[4] = "April";
	CalMonths[5] = "May";
	CalMonths[6] = "June";
	CalMonths[7] = "July";
	CalMonths[8] = "August";
	CalMonths[9] = "September";
	CalMonths[10] = "October";
	CalMonths[11] = "November";
	CalMonths[12] = "December";

    var time=new Date();
    var month=CalMonths[time.getMonth() + 1];
    var date=time.getDate();
    var year=time.getYear();
    
    if((year > 0) && (year < 200)) year = 1900 + year;
    
    whatDate = new Date();
    var whatDay = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    var whatMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
    
    date_today = (whatDay[whatDate.getDay()]+", "+whatMonth[whatDate.getMonth()]+ " " + date + ", " + year);
    return date_today;
    }
    
    // Load initial images for left and feature navs
    function image_load(curFeature) {
        if (curPage == "specs2") {
            if (ns4) document.layers[curFeature].visibility = "show"
            else if (ie4) document.all[curFeature].style.visibility = "visible"
            // Turn feature image on
            imgOn1 = eval(curFeature + "off.src");
            document [curFeature].src = imgOn1;
        }
        else {
           if (curFeature != "") {
              // Turn current feature image back on
              imgOn = eval(curFeature + "off.src");
              document [curFeature + "img"].src = imgOn;
              // Turn text on
              if (ns4) {
                 document.layers[curFeature].visibility = "show";
              }
              else if (ie4) {
                 document.all[curFeature].style.visibility = "visible";
              }
           }
       }
            
       if (curVehicle != "") {
           curVehicle = curVehicle.toUpperCase(); 
           if (curVehicle == "300M") {
                curVehicle = "M300";
           }
           if (ns4) document.layers[curVehicle].visibility = "show"
           else if (ie4) document.all[curVehicle].style.visibility = "visible"
           // Turn box image on
           imgOn1 = "/img/vehicle_box_on.gif";
           document [curVehicle + "img"].src = imgOn1;
       }
       
       if (curPage != "home") {
          if (curPage != "") {
            // Turn Left Nav Image on
            navOn = eval("leftNavon.src");
            navName = ("leftNav" + curPage);
            document [navName].src = navOn;
          }        
       }
    }

   function openWebspot() {
        window.open("http://www.webspot.com/chrysler/ptcruiser/choice/index.html","WebSpot",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=620,height=435');
   } 
   
var msg = "You are now leaving the Chrysler Web Site. Thank you for visiting and come again soon.";

function confirmNewWindow(newUrl)
{
        if (confirm(msg)){
                window.open(newUrl, TARGET='_blank');
        }
}    
    
    //Global Nav Mouseover
    function global_on(imgName) {
        imgOn = eval(imgName + "on.src");
        document [imgName].src = imgOn;
    }

    //Global Nav MouseOut
    function global_off(imgName) {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
    }

    //Help Mouseover
    function help_on(imgName) {
        imgOn = eval(imgName + "on.src");
        document [imgName].src = imgOn;
    }

    //Help MouseOut
    function help_off(imgName) {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
    }    
    
    // Features Nav Mouseover
    function feature_on(imgName) {
        // Change text
        if (ns4) document.layers[curFeature].visibility = "hide"
        else if (ie4) document.all[curFeature].style.visibility = "hidden"
        if (ns4) document.layers[imgName].visibility = "show"
        else if (ie4) document.all[imgName].style.visibility = "visible"
        // Turn feature image on
            imgOn1 = eval(imgName + "on.src");
            document [imgName + "img"].src = imgOn1;
        // Turn current feature image off
        imgOff = eval(curFeature + "off.src");
        document [curFeature + "img"].src = imgOff;
    }   

    // Features Nav Mouseout
    function feature_off(imgName,numb) {
       // Turn all other feature images off
       for (x = 1; x <= numb; x++) {
           imgOff = eval("feature" + x + "off.src");
           imgName1 = ("feature" + x + "img");
           document [imgName1].src = imgOff;
       }
       // Turn current feature image back on
           imgOn = eval(curFeature + "on.src");
           document [curFeature + "img"].src = imgOn;
       // Turn Left Nav Image on
           navOn = eval("leftNavon.src");
           navName = ("leftNav" + curPage);
           document [navName].src = navOn;

      // Turn text off
        if (ns4) document.layers[imgName].visibility = "hide"
        else if (ie4) document.all[imgName].style.visibility = "hidden"
        if (ns4) document.layers[curFeature].visibility = "show"
        else if (ie4) document.all[curFeature].style.visibility = "visible"

    }
    
    // Vehicles Nav Mouseover
    function changein(vid) {
        curVehicle = curVehicle.toUpperCase(); 
        if (curVehicle == "300M") {
            curVehicle = "M300"
        }
        if (ns4)
					document.layers[vid].visibility = "show"
        else if (ie4) {
					document.all[vid].style.visibility = "visible";
					}
        // Turn box image on
        imgOn1 = "/img/vehicle_box_on.gif";
        document [vid + "img"].src = imgOn1;

        if (curVehicle != "") {
            if (ns4) document.layers[curVehicle].visibility = "hide"
            else if (ie4) document.all[curVehicle].style.visibility = "hidden"
            // Turn box image off
            imgOff = "/img/vehicle_box_off.gif";
            document [curVehicle + "img"].src = imgOff;
        }

    }
    // Vehicles Nav Mouseout
    function changeout(vid) {

        curVehicle = curVehicle.toUpperCase(); 
        if (ns4) document.layers[vid].visibility = "hide"
        else if (ie4) document.all[vid].style.visibility = "hidden"
        // Turn box image off
        imgOff = "/img/vehicle_box_off.gif";
        document [vid + "img"].src = imgOff;

        if (curVehicle != "") {        
            if (ns4) document.layers[curVehicle].visibility = "show"
            else if (ie4) document.all[curVehicle].style.visibility = "visible"
            // Turn box image on
            imgOn1 = "/img/vehicle_box_on.gif";
            document [curVehicle + "img"].src = imgOn1;
        }
}
    //Left Nav Mouseover
    function left_on(imgName) {
        if (imgName != "leftNav" + curPage) {
            if (imgName == "leftNavbuy") {
                imgOn = "/img/nav_on.gif";

                document [imgName].src = imgOn;
            } else {
                imgOn = "/img/nav_breadcrum.gif";
                document [imgName].src = imgOn;
            }
        }
    }

    //Left Nav MouseOut
    function left_off(imgName) {
        if (imgName != "leftNav" + curPage) {
           imgOff = "/img/nav_off.gif";
           document [imgName].src = imgOff;
        }
    }

    //Homepage Nav Mouseover
    function home_on(imgName) {
    var Cars = new Array(12);
	Cars[1] = "home_pt-cruiser";
	Cars[2] = "home_300m";
	Cars[3] = "home_concorde";
	Cars[4] = "home_lhs";
	Cars[5] = "home_sebring-sdn";
	Cars[6] = "home_sebring-cpe";
	Cars[7] = "home_sebring-cvt";
	Cars[8] = "home_town-country";
	Cars[9] = "home_voyager";
	Cars[10] = "home_prowler";
	Cars[11] = "home_neon";

    
       for (x = 1; x <= 11; x++) {
          imgOff = "/img/home_button_off.gif";
           imgName1 = (Cars[x]);
           document [imgName1].src = imgOff;
       }
    
            imgOn = "/img/home_button_on.gif";
            document [imgName].src = imgOn;
            img1On = "/img/" + imgName + "_roll.jpg";
            document ["vehicle"].src = img1On;
    }

    //Homepage Nav MouseOut
    function home_off(imgName) {
//           imgOff = "/img/home_button_off.gif";
//           document [imgName].src = imgOff;
//            img1Off = "/img/home_pt-cruiser_roll.jpg";
//            document ["vehicle"].src = img1Off;
    }

        //Promo Mouseover
    function promo_on(imgName) {
        imgOn = "/promos/promobutton_on.gif";
        document [imgName].src = imgOn;
    }

    //Promo MouseOut
    function promo_off(imgName) {
        imgOff = "/promos/promobutton_off.gif";
        document [imgName].src = imgOff;
    }
    
         //Marriot Mouseover
    function mariott_on(imgName) {
        document [imgName].src = "/promos/mariottbutton_on.gif";
    }

        //Marriott MouseOut
    function mariott_off(imgName) {
        document [imgName].src ="/promos/mariottbutton_off.gif";
    }
    
        //Global Gateway Mouseover
    function gateway_on(imgName) {
        if (imgName == "gobutton") {
            imgOn = "/img/gate_go_on.gif";
            document [imgName].src = imgOn;
        } else {
            imgOn = "/img/gate_visit_on.gif";
            document [imgName].src = imgOn;
        }            
    }

    //Global Gateway MouseOut
    function gateway_off(imgName) {
        if (imgName == "gobutton") {
            imgOff = "/img/gate_go_off.gif";
            document [imgName].src = imgOff;
        } else {
            imgOff = "/img/gate_visit_off.gif";
            document [imgName].src = imgOff;
        }        
    }



    // Specs Nav Mouseover
    function specs_on(imgName) {
        // Turn feature image on
            imgOn1 = eval(imgName + "on.src");
            imgName1 = (imgName + "img");
            document [imgName1].src = imgOn1;
        // Turn current feature image off
        imgOff = eval(curFeature + "off.src");
        imgName2 = (curFeature + "img");
        document [imgName2].src = imgOff;
        // Change text
        if (ns4) document.layers[curFeature].visibility = "hide"
        else if (ie4) document.all[curFeature].style.visibility = "hidden"
        if (ns4) document.layers[imgName].visibility = "show"
        else if (ie4) document.all[imgName].style.visibility = "visible"
    }   

    // Specs Nav Mouseout
    function specs_off(imgName) {
       // Turn all other specs images off
       for (x = 1; x <= 5; x++) {
           imgOff = eval("specs" + x + "off.src");
           imgName1 = ("specs" + x +"img");
           document [imgName1].src = imgOff;
       }
       // Turn current feature image back on
           imgOn = eval(curFeature + "on.src");
           imgName1 = (curFeature +"img");
           document [imgName1].src = imgOn;

      // Turn text off
        if (ns4) document.layers[imgName].visibility = "hide"
        else if (ie4) document.all[imgName].style.visibility = "hidden"
        if (ns4) document.layers[curFeature].visibility = "show"
        else if (ie4) document.all[curFeature].style.visibility = "visible"
    }

      function launchReadyToBuy( family ) {
    if( family != "" )
      family = "?" + family;
    var url = "/buy/index.html" + family;
    window.open( url, "readyToBuy", "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=436,height=255'");
  }

//To be used for popup windows with scroll bars
function collection2(topic,x,y) {
eval('window.open(topic + ".html", "glossaryWin", "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=' +  y  + ',height=' +  x + '");');
}

//To be used for popup windows without scroll bars
function noScroll(topic,x,y) {
eval('window.open(topic + ".html", "glossaryWin", "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=' +  y  + ',height=' +  x + '");');
}

function kellyWin(){
        topic = "/bounce/kbb.html";
        window.open(topic,"newWindow", 'history=no,toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=yes,resizable=no,width=550,height=480');
        }          
  
  //Launch Global Gateway Window
  function launchWindow(url,windowName) {
  window.open( url, windowName, "history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,width=700,height=255'");
 }
 
  //Launch Print Specs Window
  function fullSpecsWindow(url,windowName) {
  window.open( url, windowName, "history=no,toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,width=577,height=400'");
 }

// Links to Product Info Page from Popup Window.
function updateMainWindow(item){
alert('whatever');
   switch(item){
   case "awards":
    topic = "/experience/awards/index.html"; TARGET="myWin";
    break;
   case "pt_cruiser":
    topic = "/pt-cruiser/index.html"; TARGET="myWin";
    break;
    }
        if (window.opener.closed){
                window.top.open(topic);
                window.close();
        }else if (window.opener){
                window.opener.top.location = topic;
                window.close();
        }else{
                top.location = topic;
        }
}
//popup window asking for Flash plug-in detection
function makeRemote() {
        topic = "/pt-cruiser/teaser/detect.html";
        window.name="myWin"
        remote = open(topic,"remotewin",'width=585,height=425,history=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no');
}


         
//font size detection
var info = navigator.userAgent;
var chosenStyle = "default_size.css";

// tokens to look for
var macToken   = "Mac";
var ieToken    = "MSIE";
var v5Token    = "5.";

if( info != null ) {
  if( info.indexOf( v5Token ) >= 0 ) {
    if( info.indexOf( macToken ) >= 0) {
      chosenStyle = "mac_ie5_size.css";
    }else{
      chosenStyle = "pc_ie5_size.css";
    }
  } else {
    if( info.indexOf( macToken ) < 0 ) {
      chosenStyle = "default_size.css";
    } else {
      chosenStyle = "mac_v4_size.css";
    }
  }
}

document.write ("<link rel='stylesheet' href='/classes/" + chosenStyle + "'type='text/css'>");
