 // To open a popup window

function MM_openBrWindow(theURL,winName,features) {

  window.open(theURL,winName,features);

}





// Feedback form validation

function Feedback() {



	firstName = document.fbForm.txtFirstname

	if (firstName.value == "" || !isNaN(firstName.value))

	{

		alert("Please enter your first name");

		firstName.focus()

		return false		

	}



	
txtaddress = document.fbForm.txtaddress

	if (txtaddress.value == "" )

	{

		alert("Please enter your Address");

		txtaddress.focus()

		return false		

	}




	eveningPhone = document.fbForm.txthomephone

	if (eveningPhone.value == "" )
	{

		alert("Please enter your phone number");

		eveningPhone.focus()

		return false		

	}



	mailid = document.fbForm.txtemail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}



	
	comments = document.fbForm.txtComments

	if (comments.value == "" || !isNaN(comments.value))

	{

		alert("Please add your comments");

		comments.focus()

		return false		

	}	

	if (document.fbForm.uword.value=="" )

	{

	alert('Enter the code as it is shown');

	document.fbForm.uword.focus();

	return false;

	}

	return jcap();

	

	

}





//Random Images



                function getCookie(c_name)

                {

                if (document.cookie.length>0)

                  {

                  c_start=document.cookie.indexOf(c_name + "=")

                  if (c_start!=-1)

                    {

                    c_start=c_start + c_name.length+1

                    c_end=document.cookie.indexOf(";",c_start)

                    if (c_end==-1) c_end=document.cookie.length

                    return unescape(document.cookie.substring(c_start,c_end))

                    }

                  }

                return null

                }



                function randImagesCookie()

                {

                        if(getCookie('name')==null || getCookie('name')=="NaN")

                        {

                                document.cookie="name"+"="+1;

                        }

                        var cimgnum=getCookie('name');

                        if(cimgnum >= 4) {

                                var simgnum=1;

                        } else {

                                var simgnum=parseInt(cimgnum)+1;

                        }

						

						for(i=1; i<=4; i++)

						{

						

	                        var imagename = "cori_header_"+simgnum+"_"+i

	                        document.cookie="name"+"="+simgnum;



							var tmp = eval("document.getElementById('index"+i+"')")

    	                    var picPath="images/"+imagename+".jpg";

	                        tmp.style.backgroundImage="url('"+picPath+"')";

						}

                }







