function showdark()
	{
		document.getElementById('maskPop').style.display	=	'block';
		document.getElementById('maskPop').style.width		=	document.body.clientWidth + "px";
		document.getElementById('maskPop').style.height		=	document.body.clientHeight+3500+ "px";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'none';
	}
function showreg(picid,loc)
	{
		if(hid_val	==	"")	hid_val	=	document.getElementById('image_edit_new').innerHTML;
		document.getElementById('image_edit_new').innerHTML	=	"";
		document.getElementById('image_edit').style.display	=	'block';
		document.getElementById('image_edit').innerHTML	=	hid_val;
		document.getElementById('div_img_edit').innerHTML= "<img src='uploads/thumb2/"+loc+"' border='0'/>";
		document.getElementById('id_picid').value	=	picid;
		myPopupRelocate('image_edit');
	}
function showforgot()
	{
		document.getElementById('mask_forgot').style.display	=	'block';
		myPopupRelocate('mask_forgot');
		document.getElementById("div_err_msg").innerHTML	=	"&nbsp;";
		document.frm_forgot.accesscode.value	=	"";
		document.frm_forgot.accesscode.focus();
	}
function showchange()
	{
		document.getElementById('mask_change').style.display	=	'block';
		myPopupRelocate('mask_change');
		document.getElementById("div_err_msg").innerHTML	=	"&nbsp;";
		document.changepasswordform.oldpassword.focus();
	}
function showedit()
	{
		document.getElementById('mask_edit').style.display	=	'block';
		myPopupRelocate('mask_edit');
		document.getElementById("div_err_msg").innerHTML	=	"&nbsp;";
	}
function showslide()
	{
		document.getElementById('gallery').style.display	=	'block';
		myPopupRelocate('gallery');
	}
function showflash()
	{
		document.getElementById('image_flash').style.display	=	'block';
		myPopupRelocate('image_flash');
	}
function showcod()
	{
		document.getElementById('div_cod').style.display	=	'block';
		myPopupRelocate('div_cod');
	}
function showcod_pin()
	{
		document.getElementById('div_codpin').style.display	=	'block';
		myPopupRelocate('div_codpin');
	}
function showwelcome()
	{
		document.getElementById('div_welcome').style.display	=	'block';
		myPopupRelocate('div_welcome');
	}

function myPopupRelocate(Mypop) 
	{
		// Determine how much the visitor had scrolled
		var scrolledX, scrolledY;
		if( self.pageYOffset ) {
		scrolledX = self.pageXOffset;
		scrolledY = self.pageYOffset;
		} else if( document.documentElement && document.documentElement.scrollTop ) {
		scrolledX = document.documentElement.scrollLeft;
		scrolledY = document.documentElement.scrollTop;
		} else if( document.body ) {
		scrolledX = document.body.scrollLeft;
		scrolledY = document.body.scrollTop;
		}
		
		// Determine the coordinates of the center of browser's window
		var centerX, centerY;
		if( self.innerHeight ) {
		centerX = self.innerWidth;
		centerY = self.innerHeight;
		} else if( document.documentElement && document.documentElement.clientHeight ) {
		centerX = document.documentElement.clientWidth;
		centerY = document.documentElement.clientHeight;
		} else if( document.body ) {
		centerX = document.body.clientWidth;
		centerY = document.body.clientHeight;
		}
		
		var wid = document.getElementById(Mypop).style.width;
		var hei = document.getElementById(Mypop).style.height;
		
		var leftOffset = scrolledX + (centerX - parseInt(wid)) / 2;
		var topOffset = scrolledY + (centerY - parseInt(hei)) / 2;
		
		document.getElementById(Mypop).style.top = topOffset + "px";
		document.getElementById(Mypop).style.left = leftOffset + "px";
		document.getElementById(Mypop).style.display = "block";
		
	}

function windowClose() 
	{
		document.getElementById('image_edit').style.display = "none";
		document.getElementById('image_edit').innerHTML = "";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
	}

function windowClose_forgot() 
	{
		document.getElementById('mask_forgot').style.display = "none";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
	}
function windowClose_change() 
	{
		document.getElementById('mask_change').style.display = "none";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
	}
function windowClose_edit() 
	{
		document.getElementById('mask_edit').style.display = "none";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
		window.reload();
	}
function windowClose_slide() 
	{
		document.getElementById('maskPop').style.display = "none";
		document.getElementById('gallery').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
	}
function windowClose_flash() 
	{
		document.editprofileform.action="supload.php";
		document.editprofileform.submit();
		document.getElementById('image_flash').style.display = "none";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';
	}
function windowClose_welcome() 
	{
		document.getElementById('div_welcome').style.display = "none";
		document.getElementById('maskPop').style.display="none";
	}
function windowClose_cod() 
	{
		document.getElementById('div_cod').style.display = "none";
		document.getElementById('maskPop').style.display="none";
	}
function windowClose_codpin() 
	{
		document.getElementById('div_codpin').style.display = "none";
		document.getElementById('maskPop').style.display="none";
		var str	=	document.getElementsByTagName("select");
		var l 	= 	str.length;
		for (x = 0; x < l; x++)	str[x].style.display	=	'';

	}

