// JavaScript Document


    function geth()
    {
		 if (window.innerHeight && window.scrollMaxY) {// Firefox

		     yWithScroll = window.innerHeight + window.scrollMaxY;   

		     xWithScroll = window.innerWidth + window.scrollMaxX;   

		     } 

		     else if (document.body.scrollHeight > document.body.offsetHeight)

		     { // all but Explorer Mac   

		       yWithScroll = document.body.scrollHeight;     

		        xWithScroll = document.body.scrollWidth;     }

		      else {

		                              // works in Explorer 6 Strict, Mozilla (not FF) and Safari      

		      yWithScroll = document.body.offsetHeight;    

		      xWithScroll = document.body.offsetWidth;       } 

		                                          arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);   

		                                            //alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );  

		                                           //    return arrayPageSizeWithScroll; 

		                                          // yWithScroll = yWithScroll 

		  document.getElementById('fade').style.height = yWithScroll ;
		  document.getElementById('light').style.display='block';
		  document.getElementById('fade').style.display='block'
          document.getElementById('light').focus();

    }
	
	function geth1()
    {
		 if (window.innerHeight && window.scrollMaxY) {// Firefox

		     yWithScroll = window.innerHeight + window.scrollMaxY;   

		     xWithScroll = window.innerWidth + window.scrollMaxX;   

		     } 

		     else if (document.body.scrollHeight > document.body.offsetHeight)

		     { // all but Explorer Mac   

		       yWithScroll = document.body.scrollHeight;     

		        xWithScroll = document.body.scrollWidth;     }

		      else {

		                              // works in Explorer 6 Strict, Mozilla (not FF) and Safari      

		      yWithScroll = document.body.offsetHeight;    

		      xWithScroll = document.body.offsetWidth;       } 

          arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);   
		  document.getElementById('fade').style.height = yWithScroll ;
		  document.getElementById('light1').style.display='block';
		  document.getElementById('fade').style.display='block'
		  document.getElementById('light1').focus();

    }



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function formsubmit()
{
	document.form1.submit();
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function subvalid()
{
	if(document.getElementById('txtsubemail').value=="")
	{
		alert("Enter your email Id");
		document.getElementById('txtsubemail').focus();	
		return false;	
	}
	
	
	if(!validateEmailv2(document.getElementById('txtsubemail').value))
			{

			alert("Not a valid Email!");

			document.getElementById('txtsubemail').focus();

			return false;

			}
			return true;
}
		function validateEmailv2(email)
		{
		
			if(email.length <= 0)
			{
			  return true;
			}

			var splitted = email.match("^(.+)@(.+)$");

			if(splitted == null) return false;

			if(splitted[1] != null )

			{

			  var regexp_user=/^\"?[\w-_\.]*\"?$/;

			  if(splitted[1].match(regexp_user) == null) return false;

			}

			if(splitted[2] != null)

			{

			  var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;

			  if(splitted[2].match(regexp_domain) == null) 

			  {

				var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;

				if(splitted[2].match(regexp_ip) == null) return false;

			  }// if

			  return true;

			}

		return false;

		}
		
function flipdiv()
{
	if(document.getElementById('test-content').style.display == "")
	{
		document.getElementById('test-content').style.display = "none";
	}
	else
	{
		document.getElementById('test-content').style.display = "";
	}
}

function flipdiv1()
{
	if(document.getElementById('test1-content').style.display == "")
	{
		document.getElementById('test1-content').style.display = "none";
	}
	else
	{
		document.getElementById('test1-content').style.display = "";
	}
}

		function validateform()
		{
		
			if(document.getElementById("txtloginname").value=="")
			{
				alert("Enter Your loginid...!");
				document.getElementById("txtloginname").focus();
				return false;
			}

			if(document.getElementById("txtpassword").value=="")
			{
				alert("Enter Your Password...!");
				document.getElementById("txtpassword").focus();
				return false;
			}

			

		}
		

$(document).ready(function()
{
	$(".accordion h4:first").addClass("active");
	$(".accordion p:not(:first)").hide();

	$(".accordion h4").click(function(){
		$(this).next("p").slideToggle("slow")
		.siblings("p:visible").slideUp("slow");
		$(this).toggleClass("active");
		$(this).siblings("h4").removeClass("active");
	});

});



