
<!--
	function LoadFlash(filename,width,height){
	document.write("<OBJ"+"ECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,00,0'  width='"+width+"' height='"+height+"'>");
	document.write("<PARAM NAME='movie' VALUE='"+filename+"'>");
	document.write("<PARAM NAME='wmode ' VALUE='transparent'>");
	document.write("<PARAM NAME='quality' VALUE='best'><PARAM NAME='play' VALUE='true'></OBJ"+"ECT>");
}


	function LoadUploadCtl(server,filter,extensions,RedirectURL,scr){
	document.write("<OBJ"+"ECT CLASSID='CLSID:E87F6C8E-16C0-11D3-BEF7-009027438003' CODEBASE='XUpload.ocx' VIEWASTEXT width=350 height=200>");
	document.write("<PARAM NAME='Server' VALUE="+server+">");
	document.write("<PARAM NAME='Script' VALUE='"+scr+"'>");
	document.write("<PARAM NAME='HtmlForm' VALUE='frm'>");
	document.write("<PARAM NAME='Filter' VALUE='"+filter+"'>");		
	document.write("<PARAM NAME='Redirect' VALUE='true'>");
	document.write("<PARAM NAME='Extensions' VALUE='"+extensions+"'>");	
	document.write("<PARAM NAME='RedirectURL' VALUE="+RedirectURL+"></OBJ"+"ECT>");
}

	function OpenEditLibraryItem(ItemID) {
		//alert (strF);
	  NewWin1 = open("", "FileItem", "status=no,width=600,height=550;toolbar=no,menubar=no,resizable=yes,scrollbars=yes,location=no,titlebar=no");
	 NewWin1.document.location='/admin/EditLibraryItem.asp?ItemID=' + ItemID;
	}	
	function EditFolder(frm,FolderID) {
		//alert(FolderID);
		frm.strFunction.value='Edit';
		frm.action='/admin/Upload1.asp';
		frm.FolderID.value= FolderID;
		frm.submit();
	}
	function EditTeamFolder(frm,FolderID) {
		//alert(FolderID);
		frm.strFunction.value='Edit';
		frm.action='/admin/EditTeamFolder.asp';
		frm.FolderID.value= FolderID;
		frm.submit();
	}	
	function deleteItem(frm,deleteFileID)
		{
			var DeleteAll = confirm("WARNING!\nThis will delete this file.  Do you want to continue?");
			if (DeleteAll == true)
				{			
				 	frm.delFile.value=deleteFileID;
	  				frm.strFunction.value='deleteItem';
	  				frm.submit();	
					return false;	
				}
			return false;
		}
	function deleteFolder(frm,FolderID)
		{
			var DeleteAll = confirm("WARNING!\nThis will delete this folder.  Do you want to continue?");
			if (DeleteAll == true)
				{			
				 	frm.delFolder.value=FolderID;
	  				frm.strFunction.value='DisplayDeleteFolder';
	  				frm.submit();	
					return false;	
				}
			return false;
		}
	function ReallyDeleteFolder(frm,FolderID)
		{
		 	frm.delFolder.value=FolderID;
 			frm.strFunction.value='deleteFolder';
 			frm.submit();	
			return false;	
		}	
		
	function DownloadFile(frm,strFile){
		frm.action='/admin/Download.asp';
		frm.DLFile.value= strFile;
		frm.submit();
		return false;
	}
	function DownloadFileParent(frm,strFile){
	 //top.location = '/admin/Download.asp?DLFile=' + strFile;
	  NewWin1 = open('/admin/Download.asp?DLFile=' + strFile);
 	  return false;	  
	}		
	var NewWin;
	function HelpOpen(NewLoc) {
	  	NewWin = open("", "", "status=no,width=600,height=700;toolbar=no,menubar=no,resizable=yes,scrollbars=yes,location=no,titlebar=no,left=0,screenX=0,top=0,screenY=0");
 		NewWin.document.location= "http://www.teamportals.com/includes/UserManualBody.asp?p=" + NewLoc;
		return false;
	}

	function StartOpen(NewLoc) {
		//alert (NewLoc);
	  NewWin = open("", "Welcome", "status=no,width=400,height=600;toolbar=no,menubar=no,resizable=yes,scrollbars=yes,location=no,titlebar=no,left=0,screenX=0,top=0,screenY=0");
	  NewWin.document.location=NewLoc;
	}



	function CloseWindow(){
	if (window.opener && !window.opener.closed)
		{
			window.close();
		}
	}

	function DisplayTask(frm,fn,taskID){
		frm.strFunction.value = fn;
		frm.ID.value = taskID;
		//alert (frm.action);
		frm.submit();
		return false;
	}
	
	function ToggleMenu(objTable,objImage)
	{
		if(objTable.style.display == "none"){
			objTable.style.display = "";
			objImage.src = "../images/minus.gif";
		}
		else{
			objTable.style.display = "none";
			objImage.src = "../images/plus.gif";
		}
	}
function VerifyMailList(frm){
		var bValidForm = true;
		var errorString = "";
		if (isWhiteSpace(frm.MailName.value))
		{
			errorString = errorString + "Please enter a Name. \r";
			bValidForm = false;
		}
		if (frm.MailListID.value == "-1")
		{
			errorString = errorString + "Please select an eNewsletter. \r";
			bValidForm = false;
		}
		if (frm.Email.value == "")
		{
			errorString = errorString + "Enter an email address. \r";
			bValidForm = false;
		}
		if (((frm.Email.value)!= "") && (!validateEmail(frm.Email.value)))
		{
			errorString = errorString + "Enter a valid email address. \r";
			bValidForm = false;
		}
		if (!bValidForm)
		{
			alert(errorString);
		}
		return bValidForm;
	}
function validateUSDate( strValue ) {
/************************************************
DESCRIPTION: Validates that a string contains only 
    valid dates with 2 digit month, 2 digit day, 
    4 digit year. Date separator can be ., -, or /.
    Uses combination of regular expressions and 
    string parsing to validate date.
    Ex. mm/dd/yyyy or mm-dd-yyyy or mm.dd.yyyy
    
PARAMETERS:
   strValue - String to be tested for validity
   
RETURNS:
   True if valid, otherwise false.
   
REMARKS:
   Avoids some of the limitations of the Date.parse()
   method such as the date separator character.
*************************************************/
  var objRegExp = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/

  //check to see if in correct format
  if(!objRegExp.test(strValue))
    return false; //doesn't match pattern, bad date
  else{
    var arrayDate = strValue.split(RegExp.$1); //split date into month, day, year
	var intDay = parseInt(arrayDate[1],10); 
	var intYear = parseInt(arrayDate[2],10);
    var intMonth = parseInt(arrayDate[0],10);
	
	//check for valid month
	if(intMonth > 12 || intMonth < 1) {
		return false;
	}
	
    //create a lookup for months not equal to Feb.
    var arrayLookup = { '01' : 31,'03' : 31, '04' : 30,'05' : 31,'06' : 30,'07' : 31,
                        '08' : 31,'09' : 30,'10' : 31,'11' : 30,'12' : 31}
  
    //check if month value and day value agree
    if(arrayLookup[arrayDate[0]] != null) {
      if(intDay <= arrayLookup[arrayDate[0]] && intDay != 0)
        return true; //found in lookup table, good date
    }
		
    //check for February
	var booLeapYear = (intYear % 4 == 0 && (intYear % 100 != 0 || intYear % 400 == 0));
    if( ((booLeapYear && intDay <= 29) || (!booLeapYear && intDay <=28)) && intDay !=0)
      return true; //Feb. had valid number of days
  }
  return false; //any other values, bad date
}
	function validateEmail( strValue) {
	//DESCRIPTION: Validates that a string contains a  valid email pattern.
	// PARAMETERS: strValue - String to be tested for validity
	//RETURNS:   True if valid, otherwise false.

	//var objRegExp  = /^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/i;
	//var objRegExp = /^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/i;
	var objRegExp = /^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\'+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$/i;
	  //check for valid email
	  return objRegExp.test(strValue);
	}

	//******This function return a string after removing the leading and trailing whitespaces from the string parameter*****//
	function Trim(strValue) {

	  var reLeadingWhiteSpace = /^\s*/;
	  var reTrailingWhiteSpace = /\s*$/;

	  return strValue.replace(reLeadingWhiteSpace,"").replace(reTrailingWhiteSpace,"")
	}

	//*****This funtion returns true if the string parameter contains only the whitespaces and nothing else*****//
	function isWhiteSpace(strValue) {

	  var reWhiteSpace = /^\s*$/;
	  return reWhiteSpace.test(strValue)
	}

	//*****This function returns true if the string parameter can be converted to a valid integer value*****//
	function isInteger(strValue) {

	  var reInteger = /^\d*$/;
	  return !isWhiteSpace(strValue) && reInteger.test(strValue);
	}

	//**********This function return a string after removing the leading zeros from the string parameter********//
	function padLZero(strValue) {
	  //This function return a string after removing the leading zeros from the string parameter

	  var reLeadingZero = /^0*/;
	  return strValue.replace(reLeadingZero, "")
	}
	//**********This class is used to do the basic data validations and other date functions.********//
	//**********The constructor accepts a string parameter in the mm/dd/yyyy format.*****************//
	function cDate(strDate) {
	  //This class is used to do the basic data validations and other date functions.
	  //The constructor accepts a string parameter in the mm/dd/yyyy format.

	  //Each object of this class will contail the following properties
	  this.intDate = 0;   //This property holds the Date part
	  this.intMonth = 0;    //This property holds the Month part
	  this.intYear = 0;   //This property holds the Year part
	  this.isDate = true;   //This property determines whether it is a valid date or not
	  this.yyyymmdd = "";   //This property holds the given Date in yyyymmdd format

	  var arrMonths = new Array(31,29,31,30,31,30,31,31,30,31,30,31);
	  var arrDtElements = Trim(strDate).split("/");

	  if (arrDtElements.length != 3 || !isInteger(padLZero(Trim(arrDtElements[0]))) ||
		!isInteger(padLZero(Trim(arrDtElements[1]))) || !isInteger(padLZero(Trim(arrDtElements[2]))))
		this.isDate = false;
	  else {
		this.intMonth = parseInt(padLZero(Trim(arrDtElements[0])));
		this.intDate = parseInt(padLZero(Trim(arrDtElements[1])));
		this.intYear = parseInt(padLZero(Trim(arrDtElements[2])));

		if (this.intYear % 4 || (!(this.intYear % 100) && (this.intYear % 400))) arrMonths[1] = 28;
		if (this.intYear < 1900 || this.intYear > 9999 ||
		  this.intMonth < 1 || this.intMonth > 12 ||
		  this.intDate < 1 || this.intDate > arrMonths[this.intMonth - 1])
		  this.isDate = false;
		else
		  this.yyyymmdd = "" + this.intYear + (this.intMonth < 10 ? "0" + this.intMonth : this.intMonth) + (this.intDate < 10 ? "0" + this.intDate : this.intDate)
	  }
	}

	//*****This function returns true if the string parameter has any special characters*****//
	function isSpecialCharacter()//strText,strRegIgnore
	{
		var strTemp;
		var args=isSpecialCharacter.arguments;
		var strText = args[0];
		var strRegExp="";

		if(args.length==2)
		{
			strRegIgnore = args[1];
		}
		strTemp = "~!@#$%^&*()<>?:{}-+\\/[]=|'\",.`";

		for(i=0;i<strTemp.length;i++){
			if(strRegIgnore.indexOf(strTemp.substr(i,1))==-1)
			{
				strRegExp=strRegExp + strTemp.substr(i,1);
			}
		}

	   for (i = 0; i < strText.length; i++) {
	      if (strRegExp.indexOf(strText.charAt(i)) != -1)
	         return true;
	   }
	   return false;
	}

	function LoadFlash(filename,width,height){
	document.write("<OBJ"+"ECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' CODEBASE='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,00,0'  width='"+width+"' height='"+height+"'>");
	document.write("<PARAM NAME='movie' VALUE='"+filename+"'>");
	document.write("<PARAM NAME='wmode ' VALUE='transparent'>");
	document.write("<PARAM NAME='quality' VALUE='best'><PARAM NAME='play' VALUE='true'></OBJ"+"ECT>");
}
-->