function openWin(id, w, h) {
	var screenH, screenW
	screenH = screen.height
	screenW = screen.width
	
	var leftPos, topPos
	leftPos	= parseInt((screenW-w)/2)
	topPos = parseInt((screenH-h)/2)
	
	window.open(id,'','status=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+', left='+leftPos+', top='+topPos+'');
}

function CountrySelect(baseURL) {
	var e = document.frmCountrySelect.ddlCountry;
	var sURL = e.options[e.selectedIndex].value
	if (sURL != "") {
		window.location.href=baseURL + '/index.aspx?pageid=22&countryid=' + sURL;
	}
}

function ClearSearchTextBox() {
	if (document.forms.frmQuickSearch.txtKeyword.value == "Keyword search")
		document.forms.frmQuickSearch.txtKeyword.value = "";
} 

function SetSearchTextBox() {
	if (document.forms.frmQuickSearch.txtKeyword.value == "")
		document.forms.frmQuickSearch.txtKeyword.value = "Keyword search";
} 

function ClearForgotPasswordTextBox() {
	if (document.forms.frmForgottenPassword.txtEmailAddress.value == "Your email address")
		document.forms.frmForgottenPassword.txtEmailAddress.value = "";
} 

function SetForgotPasswordTextBox() {
	if (document.forms.frmForgottenPassword.txtEmailAddress.value == "")
		document.forms.frmForgottenPassword.txtEmailAddress.value = "Your email address";
} 

function ClearUserNameTextBox() {
	if (document.forms.frmLogin.txtUserName.value == "Username")
		document.forms.frmLogin.txtUserName.value = "";
		
		if (document.forms.frmLogin.txtUserName.value != "Username") {
			document.forms.frmLogin.txtTextPassword.style.display='none';
			document.forms.frmLogin.txtPassword.style.display='inline';
		}
} 

function SetUserNameTextBox() {
	if (document.forms.frmLogin.txtUserName.value == "") {
			document.forms.frmLogin.txtUserName.value = "Username";
			document.forms.frmLogin.txtTextPassword.style.display='inline';
			document.forms.frmLogin.txtPassword.style.display='none';
		}
		
	if (document.forms.frmLogin.txtTextPassword.value == "") {
			document.forms.frmLogin.txtTextPassword.value = "Password";
		}
} 

function ClearPasswordTextBox() {
		document.forms.frmLogin.txtTextPassword.style.display='none';
		document.forms.frmLogin.txtPassword.style.display='inline';
} 

function SetPasswordTextBox() {
		document.forms.frmLogin.txtTextPassword.style.display='inline';
		document.forms.frmLogin.txtPassword.style.display='none';
}