
<!--
// CODE FOR POPUP WINDOWS
function checkdd()
{
	if(document.form1.subs.value=="0" && document.form1.loc.value=="0")
	{
		alert("Select Atleast One Filter For Searching");
		return false;
	}
	return true;
}

function launch(newURL, newName, newFeatures, orgName)
{
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}


function daycheck(obj1,obj2,obj3)
{
	dd=parseInt(obj1.value);
    mn=parseInt(obj2.value);
    yr=parseInt(obj3.value);

    if(!(yr%400==0))
    {
    	if((yr%4==0) && (mn==2) && (dd>29))
    	{
			obj1.selectedIndex=0;
    	}
    }
    else
    {
    	if((yr%400==0) && (mn==2) && (dd>30))
    	{
			obj1.selectedIndex=0;
    	}
        else
        {
        	if((mn==2) && (dd>28))
              obj1.selectedIndex=0; 
        }
    }
}


function checknum(e)
{
	if(!e) e=window.event;
    if(!e) return true;
    cc=e.keyCode;
    if((cc>=97 && cc<=123) || (cc>=63 && cc<=90))
    {
		e.keyCode=false;
	}
}

function linkchk(obj)
{
	var sub;
	var val;
	val=obj.value;
	sub=val.substring(0,7);
	if(sub!="http://")
	  {
	  	obj.focus();
		//alert(sub);
		return false;
	  } 	
	//return true;
	
}


function popup(url, name, width, height)
{
mywinpos = findscreencenter(width,height);
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=auto,"+
"resizable=yes,width="+width+",height="+height+",top="+mywinpos[0]+",left="+mywinpos[1];
orgname="mymain";

MyNewWindow=launch(url,name,settings,orgname);
}

function findscreencenter( pwinwidth, pwinheight )
{
    winpos = new Array(2);
    scrheight = screen.height;
    scrwidth = screen.width;
    wintop = (scrheight - pwinheight-100) / 2;
    winleft = (scrwidth - pwinwidth) / 2;
    winpos[0] = wintop;
    winpos[1] = winleft;
    return winpos;
}

//CODE FOR RECURRENCE STUFF
function rbox_handler()
{
    var const_html = "Recurrence:<SELECT name=recur onChange=rbox_handler()><OPTION value=none>none</OPTION><OPTION value=daily>daily</OPTION><OPTION value=weekly>weekly</OPTION><OPTION value = monthly>monthly</OPTION><OPTION value=yearly>yearly</OPTION></SELECT>";
    var index = document.AddEvnt.recur.selectedIndex;
    var period = document.AddEvnt.recur.options[index].value;
    inputbox = "&nbsp;&nbsp;one time only";
    caption = "";
    if(period != "none")
    {
      inputbox = "&nbsp;&nbsp;for&nbsp;&nbsp;<INPUT TYPE=text size=2 maxlength=3 name=numrecur>";
      caption = "&nbsp;&nbsp;";
      if(period == "daily")
      {
        caption += "days";
        const_html = "Recurrence:&nbsp;<SELECT name=recur onChange=rbox_handler()><OPTION value=none>none</OPTION><OPTION value=daily selected>daily</OPTION><OPTION value=weekly>weekly</OPTION><OPTION value = monthly>monthly</OPTION><OPTION value=yearly>yearly</OPTION></SELECT>";
      }
      else if(period == "monthly")
      {
        caption += "months";
        const_html = "Recurrence:&nbsp;<SELECT name=recur onChange=rbox_handler()><OPTION value=none>none</OPTION><OPTION value=daily>daily</OPTION><OPTION value=weekly>weekly</OPTION><OPTION value = monthly selected>monthly</OPTION><OPTION value=yearly>yearly</OPTION></SELECT>";
      }
      else if(period == "weekly")
      {
        caption += "weeks";
        const_html = "Recurrence:&nbsp;<SELECT name=recur onChange=rbox_handler()><OPTION value=none>none</OPTION><OPTION value=daily>daily</OPTION><OPTION value=weekly selected>weekly</OPTION><OPTION value = monthly>monthly</OPTION><OPTION value=yearly>yearly</OPTION></SELECT>";
      }
      else if(period == "yearly")
      {
        caption += "years";
        const_html = "Recurrence:&nbsp;<SELECT name=recur onChange=rbox_handler()><OPTION value=none>none</OPTION><OPTION value=daily>daily</OPTION><OPTION value=weekly selected>weekly</OPTION><OPTION value = monthly>monthly</OPTION><OPTION value=yearly selected>yearly</OPTION></SELECT>";
      }
    }
    document.getElementById("recurdiv").innerHTML = const_html+inputbox+caption;
}
//-->
