function eventCheckForCookies()
	{
	var ViewedFlash = false;
	oldCookie = document.cookie.split(";");
  	
  	for (x=0; x < oldCookie.length; x++)
  		{
  			if (oldCookie[x].indexOf("flash1") >= 0) ViewedFlash = true;//user has viewed the Flash}
			var cardhdr = '	<td><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" WIDTH=536 HEIGHT=185><PARAM NAME=movie VALUE="/flash/alreadyseenit.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="alreadyseenit.swf" quality=high bgcolor=#FFFFFF WIDTH=536 HEIGHT=185 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></td>\r<td valign="top"><img src="images/pict_hallwayrun.jpg" width="243" height="185"></td>'
  		}
	
	if (ViewedFlash == false)
		{
	  	var cardhdr = '<td><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" WIDTH=779 HEIGHT=185><PARAM NAME=movie VALUE="/flash/card_introF.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="/flash/card_introF.swf" quality=high bgcolor=#FFFFFF WIDTH=779 HEIGHT=185 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT></td>'
		tempCookie = "flash1=1";
			
		var expire = new Date ();
	   	expire.setTime (expire.getTime() + (60000 * 60 * 1 * 24 * 30)); //expires in **** from users clock
	   	expire = expire.toGMTString();
	  	
		finalCookie = tempCookie+"; path=/; expires="+expire;  	
	  	document.cookie = finalCookie;
		
	  	checkForCookie = document.cookie.split(";");
	  	cookiesOn = false;
	  	for (x=0; x < checkForCookie.length; x++)
	  		{
	  			if (checkForCookie[x].indexOf("flash1") >= 0) {cookiesOn = true;}
	  		}
	  	if (cookiesOn == true) {

			}

		}
		return cardhdr;
	}
	
//Tony's code

function save_cookie( strName, strValue )
{
	var nextYear = new Date()
	//nextYear.setFullYear( nextYear.getFullYear() + 1 )
	nextYear.setYear( nextYear.getYear() + 1 )
	document.cookie = strName +  "=" + strValue + "; expires=" +
	           nextYear.toGMTString()
}
function load_cookie( strName )
{
	var strUserID
	var retval = ''
	strUserID = GetCookie( strName )
	if( strUserID != '*' )
	{
		retval = strUserID
	}
	return retval
}
function GetCookie (CookieName) {
  var cname = CookieName + "=";
  var i = 0;
  while (i < document.cookie.length) {
    var j = i + cname.length;
    if (document.cookie.substring(i, j) == cname){
        var leng = document.cookie.indexOf (";", j);
        if (leng == -1) leng = document.cookie.length;
        //leave the Cookie in URL friendly Format 
        //return unescape(document.cookie.substring(j, leng));
        return document.cookie.substring(j, leng);
    }
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; //thats -1 plus 1
  }
  return "*";
}
function load()
{
   document.forms.extLogin.userId.value = load_cookie('ckUser')
}
function save()
{
	//alert('saving...');
	save_cookie( 'ckUser', document.forms.extLogin.userId.value )
}	
