﻿// JScript File
function findregion(controlid) {
    if (controlid)
    {
        document.location.href = (document.getElementById(controlid).value);
    } else {
        /* 11/08/08 If not specify control id, then use default id for control */
        document.location.href = (document.getElementById('SelectRegion').value);
    }
};

 function findproduct(controlid) {
    window.open(document.getElementById(controlid).value);
};
        
/* สร้าง option ใน select option
function createOpt(text,link){
    var opt=new Object();
    opt.text=text;
    opt.link=link;
    return opt;
}

function createSelectlist(selectid){
    var ddl = document.getElementById(selectid);
        for (i=countrycount-1;i>=0;i--){
            var OptNew = document.createElement('option');
            
            OptNew.text = country[i].text;
            OptNew.value = country[i].link;
            if (ddl.selectedIndex >= 0){
                var OptOld = ddl.options[ddl.selectedIndex];  
                try {
                    ddl.add(OptNew, OptOld); // standards compliant; doesn't work in IE
                }
                catch(ex){
                    ddl.add(OptNew, ddl.selectedIndex); // IE only
                }
            }else{
                ddl.add(OptNew, 0);
            }
        }
}*/