// JavaScript Document

function NewWindow(mypage, myname, w, h, scroll) 
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=0'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) 
			{ 
				win.window.focus(); 
			}
	}

function ChangeLanguage_es(){ 
    //Pasa el sitio a Español
	var page = location.pathname;
	if (page == "/") {
		location = "index_es.shtml";
	}
	else {
		location = page.substring(1,page.length-6) + "_es.shtml";
	}
} 

function ChangeLanguage_en()   { 
    //Pasa el sitio a Inglés
	var page = location.pathname;	
	if (page == "/") {
		location = "index.shtml";
	}
	else {
		location = page.substring(1,page.length-9) + ".shtml";
	}
}

function NewWindowImages(mypage,w,h){
	winl = (screen.width - w) / 2;
	wint = (screen.height - h) / 2;
	winprops="width="+w+",height="+h+",top="+wint+",left="+winl+",scrollbars=no,resizable=no";
	win = window.open(mypage, "", winprops)
	if (parseInt(navigator.appVersion) >= 4){ 
		win.window.focus(); 
	}
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("popup" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=400');");
}

function switchanswer(answerobj) {
	if (answerobj.style.display == "") 
	{
		answerobj.style.display = "none";
	}
	else 
	{
		answerobj.style.display = "";
	}
}

function sendorder(lang){
	if (document.formOrder.order.value != ""){
			document.formOrder.action = "http://translation.wordmagicsoft.com/wmtrackorders/tracking.aspx?order=" + document.formOrder.order.value + "&lang=" + lang;
		document.formOrder.submit();
	}
}
function pausecomp(millis) 
{
date = new Date();
var curDate = null;

do { var curDate = new Date(); } 
while(curDate-date < millis);
} 

function switchanswerproducts(answerobj) {
	if (answerobj == Bundled){
		answerobj.style.display = "";
		/*Translators.style.display = "none";
		Dictionaries.style.display = "none";
		Others.style.display = "none";
		Addon.style.display = "none";*/
	}
	if (answerobj == Translators){
		answerobj.style.display = "";
		Bundled.style.display = "none";
		Dictionaries.style.display = "none";
		Others.style.display = "none";
		Addon.style.display = "none";
	}
	if (answerobj == Dictionaries){
		answerobj.style.display = "";
		Translators.style.display = "none";
		Bundled.style.display = "none";
		Others.style.display = "none";
		Addon.style.display = "none";
	}
	if (answerobj == Others){
		answerobj.style.display = "";
		Translators.style.display = "none";
		Dictionaries.style.display = "none";
		Bundled.style.display = "none";
		Addon.style.display = "none";
	}
	if (answerobj == Addon){
		answerobj.style.display = "";
		Translators.style.display = "none";
		Dictionaries.style.display = "none";
		Others.style.display = "none";
		Bundled.style.display = "none";
	}
}

