function chkAdd(tForm){
var chk=0;
var lst=0;
var iss=0;
var inr=0;
var pID="";
var sname="";
var hs;
for (i = 0; i < tForm.elements.length; i++) {
	if (tForm.elements[i].name == "color")break;
	if (tForm.elements[i].type == "select-one"){
	iss=1;
	if (tForm.elements[i].selectedIndex!=0){
		if(chk>0)tForm.elements[lst].selectedIndex=0;
		chk++;
		lst=i;
		pID=tForm.elements[i].name;
		hs=tForm.elements[i];
		sname=hs[hs.selectedIndex].text;
		//pants inseam required
		//if(pID=="74" || pID=="76" || pID=="84" || pID=="86"){inr=1;}
	}
	}
}
if(chk>1)tForm.elements[lst].selectedIndex=0;
switch(chk){
case 0:
if(iss){
	alert("Please Choose a Size");
	return false;}
else{
	return true;}//no size
break;
case 1:
//if its is required ins will be on form
var ins=tForm.ins;
if(ins!=null){
  if(sname.indexOf('men')!=-1 || sname.indexOf('prep')!=-1){
    if(ins.selectedIndex==0){
	  alert("Please choose an inseam length");
	  ins.focus();
	  return false;
	}
  }
  else{
    ins.selectedIndex=0;
  }
}
/*if(inr){
if(tForm.ins.selectedIndex==0){
alert("Please choose an inseam length");
tForm.ins.focus();
return false;
}
}*/
return true;
break;
default:
alert("Please Choose a Single Size");
return false;
break;
}
}
function OpenPop(pURL,sx,sy){
	iMyWidth = (window.screen.width/2) - (sx/2 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (sy/2 + 50); //half the screen height minus half the new window height (plus title and status bars).
	popwindow = window.open(pURL,'unew', "status,height=" + sy + ",width=" + sx + ",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
	if (popwindow.opener == null) popwindow.opener = window; 
	popwindow.opener.name = "opener";
}
function chkSkool(sform){
var chk_cnt=0;
if(sform.skoolID.length){
for(var xx=0;xx<sform.skoolID.length;xx++){
if(sform.skoolID[xx].checked) chk_cnt++;
}
}
else{
if(sform.skoolID.checked) chk_cnt++;
}
switch(chk_cnt){
case 0:
alert('Please Select a School');
return false;
break;
case 1:
if(sform.cat_pass.value==""){
	alert('Please Enter Your School Password');
	sform.cat_pass.focus();
	return false;}
return true;
break;
default:
alert('Please Select Only One School');
for(var xx=0;xx<sform.skoolID.length;xx++){
if(sform.skoolID[xx].checked) sform.skoolID[xx].checked=false;
}
return false;
break;
}
}
function exCat(){
return confirm('Are you sure you want to exit your school catalog? To Continue Shopping please press "Cancel" and click the "Continue Shopping" button.');
}