﻿function createSelect()
{
    var target=document.getElementById("custdropdownlist");
    
    var select=document.createElement("select");
    
    var lable=document.createElement("label");
    lable.setAttribute("id","lblcars");
    
    //set style for added element
       
    lable.style.display="block";
    lable.style.paddingBottom="3px";
    
    target.style.marginLeft="7px";
    target.style.paddingBottom="0px";
    target.style.color="#07519a";
    
    select.style.width="135px";
    select.style.height="20px";
    
    var lableText=document.createTextNode("More Chevrolet models:");
    lable.appendChild(lableText);
    target.appendChild(lable);
    
    var arrValue=["http://specials.uk.msn.com/fcom/jul09/chevorlet-cruze.aspx","http://specials.uk.msn.com/fcom/june08/chevy-aveo.aspx","http://specials.uk.msn.com/fcom/july07/chevroletcaptiva.aspx"];
    var arrText=["Cruze","Aveo","Captiva"];
    select.setAttribute("id","ddlFcomNav");
    select.appendChild(createOption("","-------MODEL-------"));
    for(var i=0,length=arrValue.length;i<length;i++)
    {
        select.appendChild(createOption(arrValue[i],arrText[i]));
    }
    
    target.appendChild(select);
    select.onchange=function()
    {
        var tempUrl=this.options[this.selectedIndex].value;
        if(tempUrl!="")
        {
            window.location.href=tempUrl;
        }
    };
}
            
function createOption(value,text)
{
    var option=document.createElement("option");
    var text=document.createTextNode(text);
    option.appendChild(text);
    option.setAttribute("value",value);
    return option;
}

createSelect();

//Atlas tracking snippet
//document.write('<img height="1" width="1" src="http://view.atdmt.com/action/UK_MMNUK_UK_Peugeot_FCOM_07052009"/>');

//Left performance table
var htmlLeft = "<table class=\"pricetb\" id=\"tab1\"><tr id=\"toptr\"><td align=center class=\"tdstyle1\"><strong>Version</strong></td><td align=center class=\"tdstyle2\"><strong>On the Road RRP</strong></td><td align=center class=\"tdstyle1\"><strong>Total Price with Scrappage</strong></td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-2px\"><td align=center class=\"tdstyle1\">1.6 S</td><td align=center class=\"tdstyle2\">&pound;11,995.00</td><td align=center class=\"tdstyle1\">&pound;9,995.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-4px\"><td align=center class=\"tdstyle1\">1.6 LS</td><td align=center class=\"tdstyle2\">&pound;12,595.00</td><td align=center class=\"tdstyle1\">&pound;10,595.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-6px\"><td align=center class=\"tdstyle1\">1.6 LS Auto</td><td align=center class=\"tdstyle2\">&pound;13,695.00</td><td align=center class=\"tdstyle1\">&pound;11,695.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-8px\"><td align=center class=\"tdstyle1\">1.8 LT</td><td align=center class=\"tdstyle2\">&pound;13,595.00</td><td align=center class=\"tdstyle1\">&pound;11,595.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-10px\"><td align=center class=\"tdstyle1\">1.8 LT Auto</td><td align=center class=\"tdstyle2\">&pound;14,695.00</td><td align=center class=\"tdstyle1\">&pound;12,695.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-12px\"><td align=center class=\"tdstyle1\">2.0 VCDI S</td><td align=center class=\"tdstyle2\">&pound;13,495.00</td><td align=center class=\"tdstyle1\">&pound;11,495.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-14px\"><td align=center class=\"tdstyle1\">2.0 VCDI LS</td><td align=center class=\"tdstyle2\">&pound;14,095.00</td><td align=center class=\"tdstyle1\">&pound;12,095.00</td></tr>";
htmlLeft += "<tr style=\"position:relative;top:-16px\"><td align=center class=\"tdstyle1\">2.0 VCDI LT</td><td align=center class=\"tdstyle2\">&pound;15,195.00</td><td align=center class=\"tdstyle1\">&pound;13,195.00</td></tr>";
htmlLeft+= "</table><br><br><br>";
document.getElementById("perfomancetab").innerHTML = htmlLeft;
