function goPageNumber(){
  var page =document.getElementById('paginationPageno').value;
 // var pageno = parseInt(page)+1;
 var gotourl ='../../../../index.php'+page;
 //alert(gotourl);
 window.location.assign(gotourl);
}
 function removeemailtext(){
 var text =document.getElementById('VisitorEmailid').value;
 if(text == 'Enter your email id'){
 document.getElementById('VisitorEmailid').value='';
 }
 }

// Function for open pop up window
function openpopupwindow(imgname,height,width)
{
	window.open("/index.php/customers/popupwindow/?imgname="+imgname,null,"height="+height+",width="+width+",titlebar=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no");
}
// Function for open pop up window
function printorder(oid)
{

window.open("/index.php/customers/printorder/"+oid,"height=600,width=600");
}
function pop(path)
{
window.open(path,'','width=427, height=554');
}
function pop2(path)
{
window.open(path,'','width=427, height=297');
}
function closepop()
{
window.close();
}

// Function to change img in morephoto
function changeimg(imgsrc,title)
{
head = document.getElementById('tt');
dyndiv = document.getElementById('dl');
head.innerHTML=title;
dyndiv.innerHTML="<img src="+imgsrc+" >";
}

var popWindowHandle;
function displayStatus()
{
 popWindowHandle = window.open("","_status","titlebar=no,width=300,height=200,top=200,left=200");
 popWindowHandle.document.write('<html><head><title>Status</title><style type="text/css">body{font:bold 13px Verdana;color:red}</style></head><body  onBlur="self.focus()"><p align ="center"><img src="/app/webroot/img/customer/loading.gif"></p><BR><p align ="center">Uploading...Please wait. <BR> You will automatically be redirected <BR>once the file has been uploaded</p></body></html>');
 popWindowHandle.document.close();
 popWindowHandle.focus();
}
function hideStatus()
{
if (popWindowHandle && !popWindowHandle.closed) popWindowHandle.close(); //close it

}

	function redirectpage(id,urlpass)
	{
		var idval = document.getElementById(id).value;
		if(document.getElementById('con'))
		{
			var con = document.getElementById('con').value;
			window.location = urlpass+"?page="+idval+"&con="+con;
		}
		else
		{
			window.location = urlpass+"?page="+idval;
		}


	}

	function givecityurl( val )
	{
		var trimval = val.replace(/ /g, "");
		var url = document.getElementById('CityCitynameurl').value;
		if(url == '')
		{
			document.getElementById('CityCitynameurl').value = trimval.toLowerCase();
		}

	}
	function changetype(id)
	{
		if(document.getElementById(id).type == "text" && document.getElementById(id).value=="Password")
		{
			document.getElementById(id).value = "";
			document.getElementById(id).type = "password";
		}
		else if(document.getElementById(id).type == "text" && document.getElementById(id).value=="Username")
		{
			document.getElementById(id).value = "";
		}
	}
	function changeInputType(id)
	{

		var oldObject = document.getElementById(id);
		var newObject = document.createElement('input');

		newObject.type = "password";
		if(oldObject.size) newObject.size = oldObject.size;
		if(oldObject.value) newObject.value = "";
		if(oldObject.name) newObject.name = oldObject.name;
		if(oldObject.id) newObject.id = oldObject.id;
		if(oldObject.className) newObject.className = oldObject.className;
		oldObject.parentNode.replaceChild(newObject,oldObject);
		newObject.focus();
		return newObject;
	}
	function dofoci(id)
	{
		document.getElementById(id).focus();
	}