function bharat(){
if (screen.width>=1024){
 var gap=(screen.width-1024)/2; 
document.getElementById('uppermenu').setAttribute('width',screen.width-15);
}
else{  var gap=0;
document.getElementById('uppermenu').setAttribute('width',1024-15);
 }
document.getElementById('user_name').style.left=gap+834;
document.getElementById('logo').style.left=gap+12;
document.getElementById('menu').style.left=gap-40;
//document.getElementById('uppermenu').setAttribute('width',screen.width-20);

}
function gaps() {
    if (screen.width>867){
    var gap1 = (screen.width-867)/2;
    document.getElementById('content_div').style.marginLeft = gap1;   
   
}
else {
    gap1=78.5;
    document.getElementById('content_div').style.marginLeft = gap1;
    
}
}

function boat() {
if (screen.width>867){
    var boat1 = (screen.width-867)/2;
    
    document.getElementById('bottom_menu').style.marginLeft = boat1;
}
else {
    boat1=78.5;
   
    document.getElementById('bottom_menu').style.marginLeft = boat1;
}
    
}

function Hide(id){
	document.getElementById(id).style.visibility = "hidden";
}

function Show(id) {
	document.getElementById(id).style.visibility = "visible";
}


function ShowHideHide(id1,id2,id3) {
 
 if(document.getElementById(id1).style.visibility="hidden"){
 
	document.getElementById(id2).style.visibility = "hidden";
	document.getElementById(id3).style.visibility = "hidden";

	if((document.getElementById(id1).style.visibility) == "hidden") {
		document.getElementById(id1).style.visibility = "visible";
		
	} else {
		document.getElementById(id1).style.visibility = "hidden";
	}
	}
}
function showPage(){
	document.getElementById("page").style.visibility="visible";
	document.getElementById("loading").style.visibility="hidden";
}

function changeText(string){
 
if(string=='dos'){
document.getElementById("text").innerHTML="<BR>Do's<br><br>1. Designs should be upto 150kb in size and 400 pixels by 400 pixels.<br><br>2. We accept the file formats jpeg, gif, png for displaying your designs on the site.<br><br>3. Try to keep the resolution of the submitted designs at 100dpi to ensure clarity.<br><br>4. Do promote your designs while the voting process is on.<br><br>5. You can click the various contest thumbnails to know more about them.";
			 }
			if(string=='donts'){
			 document.getElementById("text").innerHTML="<BR>Dont's<br><br> 1. Please submit a design only once. Do not submit one design across different contests. They will be removed.<BR><BR>2. Don’t resubmit designs that don’t make it.<BR><BR>3. Designs should not contains photographs color gradations or more than 4 colors (excluding the color of the Tshirt).<BR><BR>4. The design should not contain any offensive content. Pls help us keep it clean here by reporting any such stuff thru the Report Abuse link.";
			 }


}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function validateForm(){
	var emailID=document.feedback.email
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
 
 function menu_corr(){
if (screen.width>1024){
 var gap=(screen.width-1024)/2; 
document.getElementById('uppermenu').setAttribute('width',screen.width-15);
document.getElementById('mid_menu').style.left=gap;
 document.getElementById('part').style.left=gap + 250;
 document.getElementById('shop').style.left=gap + 372;
 document.getElementById('vote').style.left=gap + 465;
 document.getElementById('cust').style.left=gap + 550;
}
else{  var gap=0;
document.getElementById('uppermenu').setAttribute('width',1024-15);
document.getElementById('mid_menu').style.left=gap;
 document.getElementById('part').style.left=gap + 250;
 document.getElementById('shop').style.left=gap + 372;
 document.getElementById('vote').style.left=gap + 465;
 document.getElementById('cust').style.left=gap + 550;
 }
 
//document.getElementById('user_name').style.left=gap+834;
//document.getElementById('logo').style.left=gap+12;
//document.getElementById('menu').style.left=gap-40;
//document.getElementById('uppermenu').setAttribute('width',screen.width-20);

}
function ShowHideHide3(id1,id2,id3,id4) {
 
 if(document.getElementById(id1).style.display="none"){
 
	document.getElementById(id2).style.display="none";
	document.getElementById(id3).style.display="none";
	document.getElementById(id4).style.display="none";
	//document.getElementById("menu_unsel").style.display="none";

	if((document.getElementById(id1).style.display) == "none") {
		document.getElementById(id1).style.display = "block";
		
	} else {
		document.getElementById(id1).style.display="none";
	}
	}
}
function ShowHideHide2(id1,id2,id3,id4) {
 
 if(document.getElementById(id1).style.visibility="hidden"){
 
	document.getElementById(id2).style.visibility = "hidden";
	document.getElementById(id3).style.visibility = "hidden";
	document.getElementById(id4).style.visibility = "hidden";
	//document.getElementById("menu_unsel").style.visibility = "hidden";
	if((document.getElementById(id1).style.visibility) == "hidden") {
		document.getElementById(id1).style.visibility = "visible";
		
	} else {
		document.getElementById(id1).style.visibility = "hidden";
	}
	}
}


