﻿<!--
var astrNo = new Array ("s001","s002","s003","s004","s005","s006","s007","s008","s009","s010","s011","s012","s013","s014");
var astrPrice = new Array(4);
astrPrice[0] =  new Array("7.4","13.1","13.1","13.1","9.8","10.7","9.8","10.7","10.7","24.6","24.6","24.6","13.1","16.4");
astrPrice[1] =  new Array("5.7","10.2","10.2","10.2","7.7","8.3","7.7","8.3","8.3","19.1","19.1","19.1","10.2","12.8");
astrPrice[2] =  new Array("57.2","101.6","101.6","101.6","76.2","82.6","76.2","82.6","82.6","190.6","190.6","190.6","101.6","127.0");
astrPrice[3] =  new Array("45.0","80.0","80.0","80.0","60.0","65.0","60.0","65.0","65.0","150.0","150.0","150.0","80.0","100.0");
var obj = document.getElementById("selectCurrency");
var HaSelected = getCookie("currency");
with(obj)
{
    if (HaSelected != "")
    {
        for (var i = 0; i < obj.length; i++)
            if (obj.options[i].value == HaSelected)
                {
                    obj.options[i].selected = true;
                    changed(i);
                    break;
                }
    }
    else
        changed(0);
}
function changed()
{
    with(obj)
    {
         var newIndex = (changed.arguments.length>0) ? changed.arguments[0] : selectedIndex;
         var newText = obj.options[newIndex].text;
         var newValue = obj.options[newIndex].value;
    }
    for (var i=0; i<astrNo.length; i++)
        document.getElementById(astrNo[i]).innerHTML = "Unit price : "+ newText + astrPrice[newIndex][i];
    setCookie("currency",newValue,"/product",90);
}
//-->
