function changeLanguageContent(obj)
{
	document.form1.lang.value = obj;
	//alert(document.form1.lang.value);
	xmlhttpPostLang();
}

function changeLanguageContent4Index(obj)
{
	document.form1.lang.value = obj;
	//alert(document.form1.lang.value);
	xmlhttpPostLang4Index();
}

function changeLanguageAccount(obj)
{
	document.form1.lang.value = obj;
	//alert(document.location);
	xmlhttpPostLangAccount();
}

function gologinuser(obj)
{
	//document.form1.action = "";
	var url = document.URL;
	//alert(url);
	var dot = url.lastIndexOf("\.");
	//alert(dot);
	var slash = url.lastIndexOf("/") + 1;
	//alert(slash);
	var filen = url.substring(slash,dot);
	//alert(filen);
	if( filen == "recommend" ){
		document.form1.operation.value = "gologinuserRecommend";
		document.form1.submit();
	}else{
		document.form1.operation.value = "gologinuser";
		document.form1.submit();
	}

}

function gologinuserRefill(obj)
{
	//document.form1.action = "";
	document.form1.operation.value = "gologinuserRefill";
	document.form1.submit();
}

function goMyAccountNewCC()
{
	document.form1.operation.value = "goMyAccountNewCC";
	document.form1.submit();
}

function goSignupPage1()
{
	//document.form1.operation.value = "goSignupPage1";
	//document.form1.submit();
	location.href="http://www.mezun.com/telefon/cc/neworder/neworderLogin.cfm";
}
function goFeedBack()
{
	document.form1.operation.value = "goFeedBack";
	document.form1.submit();
}

function goPrices()
{
	document.form1.operation.value = "goPrices";
	document.form1.submit();
}

function goRefill()
{
	document.form1.operation.value = "goMyAccountRefill";
	document.form1.submit();
}

function goAccountIndex()
{
	document.form1.operation.value = "goMyAccountIndex";
	document.form1.submit();
}

function goAccountProfileGeneral()
{
	document.form1.operation.value = "goMemberPersonalInfo_PersonalUpdated";
	document.form1.submit();
}


function xmlhttpPostLang() 
{
	var lang = document.form1.lang.value;
    qstr = 'ajaxoperation=changeLanguageContent&lang=' + escape(lang);  // NOTE: no '?' before querystring
    var xmlHttpReq = false;
	    var self = this;
	    var strURL ="../servlet/AjaxServlet?"+qstr;
	    // Mozilla/Safari
	    if (window.XMLHttpRequest) {
	        self.xmlHttpReq = new XMLHttpRequest();
	    }
	    // IE
	    else if (window.ActiveXObject) {
	        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    self.xmlHttpReq.open('POST', strURL, true);
	    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    self.xmlHttpReq.onreadystatechange = function() {
	        if (self.xmlHttpReq.readyState == 4) {
	            updatepageLang(self.xmlHttpReq.responseText);
	        }
	    }
	    self.xmlHttpReq.send(null);
}

function updatepageLang(str)
{
	document.form1.action = document.location;
	document.form1.submit();
}

function xmlhttpPostLang4Index() 
{
	var lang = document.form1.lang.value;
    qstr = 'ajaxoperation=changeLanguageContent&lang=' + escape(lang);  // NOTE: no '?' before querystring
    var xmlHttpReq = false;
	    var self = this;
	    var strURL ="servlet/AjaxServlet?"+qstr;
	    // Mozilla/Safari
	    if (window.XMLHttpRequest) {
	        self.xmlHttpReq = new XMLHttpRequest();
	    }
	    // IE
	    else if (window.ActiveXObject) {
	        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    self.xmlHttpReq.open('POST', strURL, true);
	    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    self.xmlHttpReq.onreadystatechange = function() {
	        if (self.xmlHttpReq.readyState == 4) {
	            updatepageLang4Index(self.xmlHttpReq.responseText);
	        }
	    }
	    self.xmlHttpReq.send(null);
}

function updatepageLang4Index(str)
{
	document.form1.action = document.location;
	document.form1.submit();
}

function liveChat()
{
	//var childWindow = open('http://server.iad.liveperson.net/hc/74525093/?SESSIONVAR!skill=Olicard&cmd=file&file=visitorWantsToChat&site=74525093&byhref=1','LiveChat','width=636,height=462,toolbar=0,resizable=0');
	//var childWindow = open('http://server.iad.liveperson.net/hc/74525093/?SESSIONVAR!skill=Mezungroup&cmd=repstate&site=74525093&imageUrl=http://www.mezun.com/Images/LiveChat/&ver=1','LiveChat','width=636,height=462,toolbar=0,resizable=0');
	//var childWindow = open('http://server.iad.liveperson.net/hc/74525093/?cmd=file&amp;file=visitorWantsToChat&amp;site=74525093&amp;SESSIONVAR!window_look=olicard&amp;imageUrl=http://www.mezun.com/Images/LiveChat/&amp;referrer='+escape(document.location),'chat74525093','width=472,height=320');
	var childWindow = open('http://server.iad.liveperson.net/hc/74525093/?cmd=file&file=visitorWantsToChat&site=74525093&SESSIONVAR!skill=cardoli&SESSIONVAR!window_look=cardoli&referrer='+escape(document.location),'chat74525093','width=472,height=320');
	childWindow.opener = self;
}

function goMyAccountNewOrder()
{
	document.form1.operation.value = "goMyAccountNewOrder";
	document.form1.submit();
}


function xmlhttpPostLangAccount() 
{
	var lang = document.form1.lang.value;
    qstr = 'ajaxoperation=changeLanguageContent&lang=' + escape(lang);  // NOTE: no '?' before querystring
    var xmlHttpReq = false;
	    var self = this;
	    var strURL ="../servlet/AjaxServlet?"+qstr;
	    // Mozilla/Safari
	    if (window.XMLHttpRequest) {
	        self.xmlHttpReq = new XMLHttpRequest();
	    }
	    // IE
	    else if (window.ActiveXObject) {
	        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    self.xmlHttpReq.open('POST', strURL, true);
	    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	    self.xmlHttpReq.onreadystatechange = function() {
	        if (self.xmlHttpReq.readyState == 4) {
	            goAccountIndex();
	        }
	    }
	    self.xmlHttpReq.send(null);
}

function resetloginpass()
{
	document.form1.operation.value = "goLoginEmail";
	document.form1.submit();
}

function goNewsLetterE()
{
	document.form1.operation.value = "goNewsLetter";
	document.form1.submit();
}



