function goToGal(val)
{

	val = val.split('#');
	if(val[0]=="1")
	{

		var url = "subindex.php?Call=viewGallery&gID="+val[1]

		window.location.href = url;

	}
	else
	{
		var url = "subindex.php?Call=viewGalleryExt&gID="+val[1]+"&sID="+val[2]+"&mID="+val[3]

		window.location.href = url;
	}

}



function movewin(win, width, height) {

		var fullWidth = screen.availWidth;

		var fullHeight = screen.availHeight;

		var x = (fullWidth/2)-(width/2);

		var y = (fullHeight/2)-(height/2);

		win.moveTo(x,y); 

	}

function viewWin(filenames)

{

	

	filenames=filenames;

	width='1003';

	height='700';

		

	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);

	

	movewin(newwin, width, height);

	    if (navigator.appName=="Netscape") 

	        newwin.location=url;

		

		newwin.opener=window;

		newwin.focus();

		return false;

}



function viewWins(filenames)

{

	

	filenames=filenames;

	width='800';

	height='600';

		

	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);

	

	movewin(newwin, width, height);

	    if (navigator.appName=="Netscape") 

	        newwin.location=url;

		

		newwin.opener=window;

		newwin.focus();

		return false;

}



function showform(val)

{

	var  e = document.getElementById(val);

	

	 if(e.style.display == 'block')

	          e.style.display = 'none';

	       else

	          e.style.display = 'block';



}



function validatemobile(val)

{

	

	frm = document.getElementById(val);

	

	if(frm.phone0.value=="")

	{

		alert("Please enter mobile number!");

		frm.phone0.select();

		return false;

	}

	if(frm.phone1.value=="")

	{

		alert("Please enter mobile number!");

		frm.phone1.select();

		return false;

	}

	if(frm.phone2.value=="")

	{

		alert("Please enter mobile number!");

		frm.phone2.select();

		return false;

	}

	



}
