<!--




function addToFavorite(){
    if(navigator.appName=="Netscape"){
		alert("Please press ^D (CTRL-D) to bookmark this page");
    }else if(parseInt(navigator.appVersion)>3){
	    var pagetitle = document.title.toString();
        if (pagetitle=="") {
           pagetitle = "Global Sources: The Largest Base of Suppliers";
        }
        var urlstr = document.location.toString();
        var patternQnMark = /\?/;
        var patternSlash = /\//;
        var patternGM = /GeneralManager/;
        urlstr = urlstr.replace(/http:\/\//,"");
        if (patternSlash.test(urlstr)) {
            if ((urlstr.substring(urlstr.length-4,urlstr.length)==".jsp") ||
                (urlstr.substring(urlstr.length-4,urlstr.length)==".com") ||
                (urlstr.substring(urlstr.length-1,urlstr.length)=="/"))
            {
                window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
            } else {
                window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)
            }
        }  else if (patternQnMark.test(document.location) || patternGM.test(document.location)) {
            window.external.AddFavorite(document.location+"&ref=bmk",pagetitle)
        } else {
            window.external.AddFavorite(document.location+"?ref=bmk",pagetitle)
        }
    }
}

function HomepageNS() {
alert("Please Drag the link onto your Home button to make this your Home Page.");
}

//for video file of Quality page
var myImage = new Image(50,50);
myImage.src = 'http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/ST/i/LOADINGCIRCLE.GIF';

var http_request = false;

function showVideo() {
	http_request = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		http_request = new XMLHttpRequest();

		if (http_request.overrideMimeType) {
			http_request.overrideMimeType('text/xml');
		}
 } else if (window.ActiveXObject) { // IE
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");

	 } catch (e) {
			try {
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
		 } catch (e) {}

		}
	}
	if (!http_request) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}
	http_request.onreadystatechange = displayVideo;

	http_request.open('GET', 'GSOL-CNN.HTM', true);
	http_request.send(null);
}

function displayVideo() {
	/*
	 * readyState 0 (uninitialized)
	 * readyState 1 (loading)
	 * readyState 2 (loaded)
	 * readyState 3 (interactive)
	 * readyState 4 (complete) 
	 */
	if (http_request.readyState == 1) {
			document.getElementById("video").innerHTML = "<table width=\"216\" height=\"162\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td width=\"216\" height=\"162\" valign=\"middle\" align=\"center\"><img src=\"http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/ST/i/LOADINGCIRCLE.GIF\" width=\"50\" height=\"50\" border=\"0\" /></td><td width=\"1\" height=\"162\"><img src=\"http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/SITE/I/0.GIF\" width=\"1\" height=\"162\" border=\"0\" /></td></tr></table>";

 } else if (http_request.readyState == 4) {
		if (http_request.status == 200) {
			document.getElementById("video").innerHTML = "";
			document.getElementById("video").innerHTML = http_request.responseText;

	 } else {
			alert('There was a problem with the request.');
		}
	}
}


/*gshp redesign -- may2009*/
function showOnlineSourcing() {
	document.getElementById("menulist2").style.width = document.getElementById("menuon").offsetWidth + 1;
	document.getElementById("menulist2").style.display = "block";
//	document.searchbox.search_what.style.display = "none";   //jun2009 -- to fix the dhtml dropdown that won't overlap on the select list	
}
function hideOnlineSourcing() {
	document.getElementById("menulist2").style.display = "none";
 //   document.searchbox.search_what.style.display = "inline";   //jun2009 -- to fix the dhtml dropdown that won't overlap on the select list
}
/*end gshp redesign -- may2009*/

// -->
