var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

var popUpSite=0;

function popUpWindowSite(URLStr, left, top, width, height)

{

  if(popUpSite)

  {

    if(!popUpSite.closed) popUpSite.close();

  }

  popUpSite = open(URLStr, 'popUpSite', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

function gotoCountry(countryOptions) {

	var location = countryOptions.options[countryOptions.selectedIndex].value;
	
	if (location) {
		document.location = location;
	} else {
		countryOptions.selectedIndex = 0;
	}
}

function preSelectCountry() {
	var countryOptions = document.getElementById('country');

	if (!countryOptions)
		setTimeout("preSelectCountry()", 1000);

	var i;
	for (i = 0; i < countryOptions.length; i++) {
		if ("TG" == right(countryOptions.options[i].value, 2)) {
			countryOptions.selectedIndex = i;
		}
	}

	var quicksetupOptions = document.getElementById('qsCountry');
	if (quicksetupOptions) {
		var c = 0;
		for (c = 0; c < quicksetupOptions.length; c++) {
			if ("TG" == quicksetupOptions.options[c].value) {
				quicksetupOptions.selectedIndex = c;
			}
		}
	}
}
// JavaScript Document