
//--------------- Special function ---------------
function changePortion(sel_elem,old_ind,page_url) {
 var ind=sel_elem.selectedIndex;
 if (ind!=old_ind)
   location.href=page_url+sel_elem.options[ind].value
 }


//--------------- Make Pull-Down Window ---------------
function makePullDn(name,source,width,height) {
 var win_prop="location=no,toolbar=no,directories=no,menubar=yes,status=yes,"+
	"scrollbars=yes,resizable=yes,dependent=no,width="+width+",height="+height
 if (window.screen)
   win_prop+=",screenX="+Math.floor((screen.width-width)/2)+",screenY="+Math.floor((screen.height-height)/2)
 return open(source,name,win_prop)
 }

//--------------- Check E-mail ---------------
function checkEmail(str) {
 was_ata=0
 l=str.length
 for (i=0; i<l; i++) {
   ch=str.charAt(i)
   if (ch=='@')
     if ((was_ata==1)||(i==0)||(i+1==l)) break
     else was_ata=1
   else
     if (((ch<'A')||(ch>'Z'))&&((ch<'a')||(ch>'z'))&&
	((ch<'0')||(ch>'9'))&&(ch!='_')&&(ch!='-')&&(ch!='.')) break
   }
 return !((i<l)||(i==0)||(was_ata==0))
 }
