<!--

var pageHOME =0;
var pageREWARDS =1;
var pageACTION
pageACTION =new Array();
//pageACTION[0] ='/blind.aspx';
pageACTION[1] ='/home.aspx';
pageACTION[2] ='/rewards.aspx';
//pageACTION[3] ='/acctLogIn.aspx';
//pageACTION[4] ='/badBlood.aspx';
pageACTION[5] ='/aboutUs.aspx';
//pageACTION[6] ='/showLocationMap.aspx';
pageACTION[7] ='/careers.aspx';
pageACTION[8] ='/goLocal.aspx';
pageACTION[9] ='/donateNow.aspx';
pageACTION[10] ='/learnMore.aspx';
pageACTION[11] ='/getInvolved.aspx';
pageACTION[12] ='/privacyPolicy.aspx';

//standard function header
/*
================================================================
Function:
Summary:
Parameters:
Return Value:
History:
================================================================
*/

/*
================================================================
Function Summary...
================================================================
-noOp
-setCookie
-getCookieValue
-getCookie
-setDateTo
-changePage
================================================================
*/


/*
================================================================
Constants, Global Variables, and preLoads
*/


/*
================================================================
Function:		noOp
Summary:
Parameters:
Return Value:	void
History:			initial -10.06.08 -swc
================================================================
*/
function noOp(){

	//alert('. . .');
	return;
} //noOp


/*
===============================================================================
Function:		setCookie
Summary:			Sets a cookie with the specified value, expiration, path, domain, and secure values
Parameters:
  -strName:		cookie name // argV[0]
  -strValue:	value to set cookie to //argV[1]
  -argV[2]:		cookie expiration date (expected format: Wdy, DD-MM-YYYY HH:MM:SS GMT)
  -argV[3]:		path value subdirectory for which the cookie is valid
  -argV[4]:		domain name for which the cookie is valid
  -argV[5]:		if true, the cookie will only be transmitted via a secure communication channel
Return Value:	void
History:			reEngineered -10.06.08 -swc
===============================================================================
*/
function setCookie(strName, strValue){
var argV =setCookie.arguments;
var argC =setCookie.arguments.length;
var expires =(argC >2)? argV[2] :null;
var path =(argC >3)? argV[3] :null;
var domain =(argC >4)? argV[4] :null;
var secure =(argC >5)? argV[5] :null;

	document.cookie =strName +'=' +escape(strValue) +
	((expires ==null) ?'' :('; expires=' +expires.toGMTString())) +
	((path ==null) ?'' :('; path=' +path)) +
	((domain ==null) ?'' :('; domain=' +domain)) +
	((secure ==true) ?'; secure' :'');
	
	return;
} //setCookie


/*
===============================================================================
Function:		getCookieValue
Summary:
Parameters:
Return Value:
History:			reEngineered -10.06.08 -swc
===============================================================================
*/
function getCookieValue(iOffSet){
var indxEndStr =document.cookie.indexOf(';', iOffSet);

	if(indxEndStr == -1)
		indxEndStr =document.cookie.length;
	return unescape(document.cookie.substring(iOffSet, indxEndStr));
} //getCookieValue


/*
===============================================================================
Function:		getCookie
Summary:			Returns the value of the cookie 'strName'
Parameters:
  -strName:		cookie name
Return Value:	string
Comments:		Dependant on getCookieValue function
History:			reEngineered -10.06.08 -swc
===============================================================================
*/
function getCookie(strName){
var argName =strName +'=';
var argLen =argName.length;
var cookieLen =document.cookie.length;
var iLCV =0;
var jLCV;

	while(iLCV < cookieLen){
		jLCV =iLCV +argLen;
		if(document.cookie.substring(iLCV, jLCV) ==argName)
			return getCookieValue(jLCV);
		iLCV =document.cookie.indexOf(' ', iLCV) +1;
		if(iLCV ==0)
			break;
	}
	return null;
} //getCookie


/*
================================================================
Function:		setDateTo
Summary:
Parameters:
	-objText:	form textBox object
	-sDate:		string date value
Return Value:	void
History:			initial -10.06.08 -swc
================================================================
*/
function setDateTo(objText, sDate){

	objText.value =sDate;
	return;
}//setDateTo


/*
================================================================
Function:			changePage
Summary:
Parameters:
Return Value:
History:			initial -01.02.09 -swc
================================================================
*/
function changePage(pageID, pageSTATE){
//alert(pageID +'\n' +pageSTATE);

   window.document.forms.changePage.action =pageACTION[parseInt(pageID)];
	window.document.forms.changePage.pageStateI.value =parseInt(pageSTATE);
   window.document.forms.changePage.submit();
return;
} //changePage

/*
================================================================
Function:			Open new window
Summary:
Parameters:
Return Value:
History:			
================================================================
*/
function OpenWindow(sFileName){



   windowPdfDoc =window.open(sFileName, 'OpenSite', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
   windowPdfDoc.focus();

return;
} //OpenWindow


/*
================================================================
Function:			showThePDF
Summary:
Parameters:
Return Value:
History:			initial -01.15.09 -swc
================================================================
*/
function showThePDF(sFileName){
var sFileSpec;
//alert('showThePDF...');

   sFileSpec = '../pdf/' + sFileName + '.pdf';

alert(sFileSpec);
   windowPdfDoc =window.open(sFileSpec, 'pdfDoc', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
   windowPdfDoc.focus();

return;
} //showThePDF


/*
================================================================
Function:			goToTheSite
Summary:
Parameters:
Return Value:
History:			initial -01.15.09 -swc
================================================================
*/
function goToTheSite(sSiteDomain, bSSL){
var sUrlSpec;
//alert('goToTheSite...');

   if(! bSSL){
      sUrlSpec = 'http://' + sSiteDomain;
   }else{
      sUrlSpec = 'https://' + sSiteDomain;
   }
alert(sUrlSpec + '\n' +bSSL);

   //windowPdfDoc =window.open(sFileSpec, 'pdfDoc', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
   //windowPdfDoc.focus();

return;
} //goToTheSite


function moveWindow(mywindow, Controlobj) {	
    var curleftPos =  0;        
    var curtopPos = 0;	
    if (Controlobj.offsetParent)        
    {         
        do {  
            curleftPos += Controlobj.offsetLeft;		
            curtopPos += Controlobj.offsetTop;     	 
           } while (Controlobj = Controlobj.offsetParent);        
    }  
    mywindow.moveTo(curleftPos,curtopPos);
   
    
}


// -->
