var center_content_id = "home;services;clients;portfolio;skillsets;sitemap;contactus;aboutus;";//products
	function center_content(id)
	{
			center_content_ids = center_content_id.split(';')
			for(var i=0; i<center_content_ids.length-1; i++)
			{
				var id_temp			= ''
				var id_temp_content = ''
				id_temp			= center_content_ids[i]
				id_temp_content = center_content_ids[i]+"_content"
				
				if( id_temp == id )
				{
					document.getElementById(id_temp).className = 'current'
					document.getElementById(id_temp_content).style.display = ''
					if(id=='home')
						document.getElementById('home_bottom_page').style.display = ''
				}
				else
				{
					document.getElementById(id_temp).className = ''
					document.getElementById(id_temp_content).style.display = 'none'
					document.getElementById('home_bottom_page').style.display = 'none'
				}
				if(id=='home')
						document.getElementById('home_bottom_page').style.display = ''
				
			}
	}

	function stateChanged(){
  		if (xmlHttp.readyState == 4 ){
     		 document.getElementById("content").innerHTML=xmlHttp.responseText;
    	}
	}
	
	function GetXmlHttpObject(){ 
		var xmlHttp=null;
  		try{ 
      		xmlHttp=new XMLHttpRequest();
    	}
  		catch (e){ 
     		try{ 
        		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        	}
     	catch (e){ 
        		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        	}
     	}
  	return xmlHttp;
	}
	
	function showblock()	
	{
		//document.getElementById('login').style.visibility="visible";
		document.getElementById('login').style.display="block";
	}
	function hideblock()
	{
		//document.getElementById('login').style.visibility="visible";
		document.getElementById('login').style.display="none";
	}
	
	var scrlStr="SamSej: One Stop for Web Solutions"
	var width=140;
	var strLen=scrlStr.length;
	var pos=1-width;                
	function scroll() {
    	var scroll = "";                
    	pos++;                          
    	if(pos == strLen)              
      		 pos =1 - width;            
    	if(pos<0){                   
        	 for(var i=1;i<=Math.abs(pos);i++)
          		 scroll=scroll+" ";  
		         scroll=scroll+scrlStr.substring(0,width-i+1);
   		 }
    	else
        	scroll=scroll+scrlStr.substring(pos,pos+width);
		    window.status=scroll;         
    		setTimeout("scroll()",75);    
	}
	
	function popup(mylink, windowname)
	 {
		if (! window.focus)return true;
			var href;
			if (typeof(mylink) == 'string')
			   href=mylink;
			else
			   href=mylink.href;
		window.open(href, windowname, 'width=800,height=600,scrollbars=yes,resizable=no');
		return false;
	}
	
	
	function reset_txt()
	{
		document.feeddbackfrm.username.value="";
		document.feeddbackfrm.email.value="";
		document.feeddbackfrm.phone.value="";
		document.feeddbackfrm.subject.value="";
		document.feeddbackfrm.suggestion.value="";
	}
	
	function stateChanged(){
  		if (xmlHttp.readyState == 4 ){
			 document.getElementById("content").innerHTML=xmlHttp.responseText;
    	}
	}
	
	function GetXmlHttpObject(){ 
		var xmlHttp=null;
  		try{ 
      		xmlHttp=new XMLHttpRequest();
    	}
  		catch (e){ 
     		try{ 
        		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        	}
     	catch (e){ 
        		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        	}
     	}
  	return xmlHttp;
	}
	

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.feeddbackfrm.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
	}
	
	 if(document.feeddbackfrm.username.value== "")
		{
			alert("Please Enter Your Name");
			document.feeddbackfrm.username.focus();
			return false;
		}
       else if(document.feeddbackfrm.subject.value== "")
		{
		    alert("Please Enter The Subject");
			document.feeddbackfrm.subject.focus();
			return false;
		}
       else if(document.feeddbackfrm.suggestion.value== "")
		{
			alert("Your Suggestions Please");
			document.feeddbackfrm.suggestion.focus();
			return false;
		}
	    else
		{
	    	document.feeddbackfrm.action="feedback.php";
			document.feeddbackfrm.submit();
			return true;
			document.feeddbackfrm.user.focus();
	 	 }
	return true
 }
 
