﻿

function goToPage(no) {
    var pageVal = document.getElementById("websites").options[no].value;
	//use xml to get value
    if (pageVal == "") {
        alert("no page specified");
    }
    else {
        window.location = pageVal;
		//window.open(pageVal);
    }
}
function strStartsWith(str, prefix) {
    return str.indexOf(prefix) === 0;
}

function goToPageNew(no) {
    var pageVal = document.getElementById("websites").options[no].value;
	//use xml to get value
    if (pageVal == "") {
        alert("no page specified");
    }
    else {
		var strtswth = strStartsWith(pageVal, "http://www.alghanim.com");
		var strtswth1 = strStartsWith(pageVal, "/CorpWeb");
		if ((strtswth == true) || (strtswth1 == true))
		{
			window.location = pageVal;
		}
		else
		{
			
		window.open(pageVal);
		}
        //window.location = pageVal;
    }
}

function getit1(no) {
    var page = document.getElementById("selectbus").options[no].value;
	if (page == "0") {
   alert("no page specified");
    }
    else {
        window.location = page;
    }
	
}

function getit2(no) {

    var page1 = document.getElementById("selectfunc").options[no].value;
    if (page1 == "0") {
		alert("no page specified");
           }
    else {
        window.location = page1;
    }
}

