// JavaScript Document Copyright 2006 Written By Anoop K. Gupta for The Indus Byte Technologies.
// For any Suggestion or Web related Qery contact anoop@theindusbyte.com.
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
		return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
//history
function his_for()
{
if(window.history.length < 1)
{
alert("There are no pages in your history");
}
window.history.go(1);
}
//back
function his_back()
{
if(window.history.length < 1)
{
alert("There are no pages in your history");
}
window.history.go(-1);

}
// bookmark
function bookmark()
{
window.external.AddFavorite('http://www.nodnat.org','Nodnat Educational Services');	
}
//menu
function expand(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuHover";
  d.className = "menuHover";
}

function collapse(s)
{
  var td = s;
  var d = td.getElementsByTagName("div").item(0);

  td.className = "menuNormal";
  d.className = "menuNormal";
}
//validation
function check()
{
	var att = window.form1.email.value.indexOf('@');
	var dot = window.form1.email.value.indexOf('.');
	
	if(window.form1.fname.value == "" || window.form1.address.value == ""	|| window.form1.telephone.			value=="" || window.form1.email.value == "")
	{
alert("Please Fill all the mandatory values.");
return false;
	}
	if(isNaN(window.form1.telephone.value))
	{
	alert("Please fill only numeric value in Telephone Field.");
	window.form1.telephone.select();
	return false;
	}

	if((att <=1) && (dot <=1))
	{
	alert("Please fill correct value in email field");
	window.form1.email.select();
	return false;
	}
return true;
}