function enguageSelect(pagelink){
	var en	="";
	en			=$F('language');
	location.href=pagelink + "?en=" + en;
}

function centrepop(url,sx,sy) 
{
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
  popupwin=window.open(url,"popup","toolbar=no,location=no,resizable=no,directories=no,status=no,statusbar=no,menubar=no,scrollbars=no,top="+wint+",left="+winl+",width="+sx+",height="+sy+"");

}

function manufacturerSelect(){
	var en	="";
	en			=$F('form1:dropDown1');
	if (en!=""){
		location.href="HandSetChoice.php?mfc=" + en;
	}
}

function updatedate(da,issub){
	$('dateformat').style.visibility="visible";
	$('form1:calendar_field').style.visibility="visible";
	$('form1:calendar_field').value=da;
	if (issub=='y'){
		$('form1:calendar_field').disabled=false;
	}else{
		$('form1:calendar_field').disabled=true;
	}
}

function updatedateAll(da,issub){
	$('dateformat').style.visibility="visible";
	$('form1:calendar_field').style.visibility="visible";
	$('form1:calendar_field').value=da;
	if (issub=='y'){
		$('form1:calendar_field').disabled=true;
	}else{
		$('form1:calendar_field').disabled=true;
	}
}

function alldate(issub){
	if (issub=='y'){
		$('dateformat').style.visibility="hidden";
		$('form1:calendar_field').style.visibility="hidden";
	}else{
		$('dateformat').style.visibility="visible";
		$('form1:calendar_field').style.visibility="visible";
		$('form1:calendar_field').disabled=true;
	}
	$('form1:calendar_field').value="please enter date (dd/mm/YYYY)";
}

function disablenoofday(){
	$('form1:listDays').style.visibility="hidden";
}

function enablenoofday(){
	$('form1:listDays').style.visibility="visible";
}

function centrepop(url,sx,sy) 
{
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
  popupwin=window.open(url,"popup","toolbar=yes,location=no,resizable=yes,directories=no,status=yes,statusbar=yes,menubar=no,scrollbars=yes,top="+wint+",left="+winl+",width="+sx+",height="+sy+"");

}

function UserPopSwitch(){
	//form1:txtPort form1:chkSSL form1:radServerType_0  form1:radServerType_1
	if ($('form1:radServerType_1').checked){
		if ($('form1:chkSSL').checked){
			$('form1:txtPort').value="995";
		}else{
			$('form1:txtPort').value="110";
		}
	}
	if ($('form1:radServerType_0').checked){
		if ($('form1:chkSSL').checked){
			$('form1:txtPort').value="993";
		}else{
			$('form1:txtPort').value="143";
		}
	}
}
