function isEmail(email){
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
		  return true;
		}
		return false;

}

function checkrequired(which) {
var pass=true;
   if (document.images) {
      

      for (i=0;i<which.length;i++) {
      var tempobj=which.elements[i];
         if (tempobj.name.substring(0,8)=="required") {
		      //---added
			  if (tempobj.defaultValue==tempobj.value)
              tempobj.value = ""
			//
			  
			  
              if (((tempobj.type=="text"||tempobj.type=="textarea")&&
              tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
              tempobj.selectedIndex==0)) {
              pass=false;
              break;
              }
        }
      }
  }

if (!pass) {
	shortFieldName=tempobj.name.substring(8,30).toUpperCase();
	alert("Please make sure the "+shortFieldName+" field was properly completed.");
	return false;
}else{
    	if(!isEmail(which['requiredEmail'].value)){
        	alert("Email is invalid.");
        	return false;
        }
    	return true;

}
}//end of function



dom = (document.getElementById) ? true : false;

ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;

ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;

ns4 = (document.layers && !dom) ? true : false;

ie4 = (document.all && !dom) ? true : false;

nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;



//detect browser

isNS4 = (document.layers) ? true : false;

isIE4 = (document.all && !document.getElementById) ? true : false;

isIE5 = (document.all && document.getElementById) ? true : false;

isNS6 = (!document.all && document.getElementById) ? true : false;

//window acmak icin kullaniyorum tam ortaya

function openWin(name,wid,hei,sbar,title){

	xx=screen.availWidth/2-wid/2;

	yy=screen.availHeight/2-hei/2;

	str="left=" + Math.round(xx) + ",top=" + Math.round(yy);

	

	window.open(name,title,'width='+wid+',height='+hei+',toolbar=no,scrollbars='+sbar+',resizable='+sbar+','+str);

}



function window_c(){

window.close()

}

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else{
    	if(!isEmail(which['requiredEmail'].value)){
        	alert("Email is invalid.");
        	return false;
        }
    	return true;
    }
}//end of checkrequired

//Div Functions
candrop = 1;
function openPage(page)
{
	show(page);
}
function switchPage(from,to)
{
	hide(from);
	show(to);
}
function show(movlay)
{
	myObj = document.getElementById(movlay);
	myObj.style.display='';
}
function hide(movlay)
{
	myObj = document.getElementById(movlay);
	myObj.style.display='none';
}
function changeImage(theimage,theobject)
{
	document.images[theobject + "image"].src = '../images/' + seasonfolder + '/' + theimage + '.gif';
}
function buttonOver(theimage,theobject)
{
	dropButton(theimage);
	if ( theobject != "" )
	{
		changeImage(theimage,theobject);
		changeLink(theimage,theobject);
	}
}
function changeLink(thelink,theobject)
{
	linkid = theobject + 'link';
	myObj = document.getElementById(linkid);
	myObj.href = '../images/' + seasonfolder + '/' + thelink + 'large.gif';
}
function changeImage2(theimage,theobject)
{
	document.images[theobject + "image"].src = '../images/' + theimage + '.gif';
}
function buttonOver2(theimage,theobject)
{
	dropButton(theimage);
	if ( theobject != "" )
	{
		changeImage2(theimage,theobject);
		changeLink2(theimage,theobject);
	}
}
function changeLink2(thelink,theobject)
{
	linkid = theobject + 'link';
	myObj = document.getElementById(linkid);
	myObj.href = '../images/' + thelink + 'large.gif';
}
function changeLink3(thelink,theobject)
{
	linkid = theobject + 'link';
	myObj = document.getElementById(linkid);
	myObj.href = thelink;
}
function dropButton(thebutton)
{
	if ( candrop )
	{
		myObj = document.getElementById(thebutton);
		myObj.style.top =  parseInt(myObj.style.top) + 2 + "px";
		myObj.style.left =  parseInt(myObj.style.left) - 2 + "px";
		myObj.style.cursor='hand';
		candrop = 0;
	}
}
function releaseButton(thebutton)
{
	if ( ! candrop )
	{
		myObj = document.getElementById(thebutton);
		myObj.style.top =  parseInt(myObj.style.top) - 2 + "px";
		myObj.style.left =  parseInt(myObj.style.left) + 2 + "px";
		myObj.style.cursor='default';
		candrop = 1;
	}
}
function popup(thepage,width,height)
{
	linkid = thepage + 'link';
	myObj = document.getElementById(linkid);
	thecontent = myObj.href;
	
	window.open(thecontent,"previewwindow", 'menubar,resizable,scrollbars,dependent,status,width=' + width + ',height=' + height);
}
function popup2(thepage,width,height)
{
	window.open("../images/" + seasonfolder + "/" + thepage + "large.gif","previewwindow", 'menubar,resizable,dependent,status,width=' + width + ',height=' + height);
}
function popup3(thepage,width,height)
{
	window.open(thepage,"previewwindow", 'menubar,resizable,dependent,status,width=' + width + ',height=' + height);
}
function popup4(thepage,width,height)
{
	window.open("../images/" + thepage + "large.gif","previewwindow", 'menubar,resizable,dependent,status,width=' + width + ',height=' + height);
}
function popup5(thepage,width,height)
{
	window.open(thepage,"previewwindow", 'menubar,resizable,dependent,scrollbars,status,width=' + width + ',height=' + height);
}
function popup6(thepage,width,height)
{
	window.open("../images/" + seasonfolder + "/" + thepage + "large.gif","previewwindow", 'menubar,resizable,dependent,scrollbars,status,width=' + width + ',height=' + height);
}
