<!--
	
function CloseWin()
{ 
 top.window.close();
}

function isEmail(Ml)
{
  if(!Ml){return true}
  if(Ml.indexOf("@")<=0 || Ml.indexOf("@")==Ml.length-1 || Ml.indexOf(".")<=0 || Ml.indexOf(".")==Ml.length-1 || Ml.indexOf("..")!=-1 || Ml.indexOf("@@")!=-1 || Ml.indexOf("@.")!=-1 || Ml.indexOf(".@")!=-1)
  {
      return false
  }
  else
  {
      return true
  }
}

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_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_findObj(n, d) { //v3.0
  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); return x;
}

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 WinOpen(url,frame,w,h)
{  
   var win=null;         
   var LeftPosition=(screen.width)?(screen.width-w)/2:100;
   var TopPosition=(screen.height)?(screen.height-h)/2:100;
   var view_status = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,scrollbars=yes,resizable=no,status=yes,location=no,directories=no';
   win = window.open(url,frame,view_status);
   win.focus();
}


function JumpUrl(list)
{
 window.location=list.options[list.selectedIndex].value
}

function checkSearch(frm) {
if(frm.search.value=="Enter Keyword(s)") {
alert("Please enter a real product name/keyword to continue \n");
frm.search.focus();
return false;
}
return true;
}

function checkNLForm(frm)
{
 if(frm.email.value.length<=1) 
  {
   alert(" Please Enter Your E-mail ");
   frm.email.focus();
   return false;
  }
   if(!isEmail(frm.email.value))
  {
   alert("Seems Invalid E-Mail Address ! \n\n  Please Enter Your Valid E-mail ");
   frm.email.focus();
   return false;
  }
 return true;
}

//-->

function toggleBox(szDivID) {
  if (document.layers) { // NN4+
    if (document.layers[szDivID].visibility == 'visible') {
      document.layers[szDivID].visibility = "hide";
      document.layers[szDivID].display = "none";
    } else {
      document.layers[szDivID].visibility = "show";
      document.layers[szDivID].display = "inline";
    }
  } else if (document.getElementById) { // gecko(NN6) + IE 5+
    var obj = document.getElementById(szDivID);
    var objSD = document.getElementById(szDivID+"SD");

    if (obj.style.visibility == 'visible') {
      obj.style.visibility = "hidden";
      obj.style.display = "none";
    } else {
      obj.style.visibility = "visible";
      obj.style.display = "inline";
    }
  } else if (document.all) { // IE 4
    if (document.all[szDivID].style.visibility == 'visible') {
      document.all[szDivID].style.visibility = "hidden";
      document.all[szDivID].style.display = "none";
    } else {
      document.all[szDivID].style.visibility = "visible";
      document.all[szDivID].style.display = "inline";
	  }
  }
}

function hideItem(id)
{
 if (document.layers) { // NN4+
 document.layers[szDivID].visibility = "hide";
 }
 else if (document.getElementById) { // gecko(NN6) + IE 5+
 var obj = document.getElementById(id);
 obj.style.visibility = "hidden";
 }
 else if (document.all) { // IE 4
 document.all[szDivID].style.visibility = "hidden";
 }
}
function showItem(id)
{
 if (document.layers) { // NN4+
 document.layers[id].visibility = "show";
 }
 else if (document.getElementById) { // gecko(NN6) + IE 5+
 var obj = document.getElementById(id);
 obj.style.visibility = "visible";
 }
 else if (document.all) { // IE 4
 document.all[id].style.visibility = "visible";
 }
}

// added on 03 Jun 2009 - deletion of cookie to save roll number for sucessfully logged in user
function clearCookie(url,roll)
{
	if(window.confirm("Roll # "+roll+" was saved for this computer because this student was sucessfully logged in. Our policy is to keep the roll # saved for 30 days. If you are using a shared computer or you are not Roll # "+roll+", it is recomended that you clear the cookie for your own safety!"))
	{
		window.parent.location = "/?go=delete-Cookie";
	}
}

/************** implmented on June 24, 2009 : to ensure that students who used an invalid email ID during registration can change their email ID if they know their password and can login to the site ********/
function resetEmail(rollnum) {
	if(window.confirm("Hi "+rollnum+"! Your Account is INACTIVE right now! you can either check your e-mail registered with us for the activation link or if you think your email ID registered with us is wrong then you can reset it. Want to reset your email ID to correct one now?"))
	{
		window.parent.location = "/?go=reset-Email&rollnum="+rollnum;
	}
}
// end hide -->