//Where in we return the value of a cookie, accepting one paramater "sName"
function GetCookie(sName)
{
	var search = sName + "=";
	var GCvalue = "(none)";
	if (document.cookie.length > 0)
	{
		var offset = document.cookie.indexOf(search);
			if (offset != -1)
			{
				offset += search.length;
				var end = document.cookie.indexOf(';', offset);
				if (end == -1) {
					end = document.cookie.length;
				}
				GCvalue=unescape(document.cookie.substring(offset, end));
			}
	}
	return GCvalue;
}

// This function does nothing, because of the return statement at line 31, nothing else is processed
function check_desktop()
{
	var bMessageOff = false;
	var sCookieValue;
	var sCookieName;
	var date =  new Date();
	date.setMonth(date.getMonth() + 1 ); // once a month check
	
	// do nothing, just return for now
	return;	
// cookies are in the form of:
//[name]=[value]; expires=[date]; path=[directory]; domain=[domain-name]; secure
// where expires date: 'Mon, 13 Oct 1997 12:40:34 GMT'
//document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
/* Since none of this is being used, it will be commented out
	Joe Grigg 4/2/2008
	
	sCookieName = "yodp_bWelcomeOff";
	alert(sCookieName);
	alert(GetCookie(sCookieName));// + window.navigator.cookieEnabled + (window.screen.width < 1024) + window.navigator.platform + window.navigator.appCodeName + window.navigator.appName);
	var search = "MSIE";
	var offset;
	var end;
	offset = window.navigator.userAgent.indexOf( search );
	if (offset != -1)
	{
		//alert(offset);
		offset += search.length + 1;
		end = window.navigator.userAgent.indexOf(";", offset);
		if (end == -1){
			end = window.navigator.userAgent.length;
			}
		sCookieValue = unescape(window.navigator.userAgent.substring(offset, end));
	} else {
		search = "Netscape";
		offset = window.navigator.userAgent.indexOf( search );
		if (offset != -1)
		{
			offset += search.length + 1;
			end = window.navigator.userAgent.length;
			sCookieValue = unescape(window.navigator.userAgent.substring(offset, end));
		}
		else
		{
			search = "Firefox";
			offset = window.navigator.userAgent.indexOf( search );
			if (offset != -1)
			{
				offset += search.length + 1;
				end = window.navigator.userAgent.length;
				sCookieValue = unescape(window.navigator.userAgent.substring(offset, end));
			}
		}
			
		alert(sCookieValue);
		alert("appName=" + window.navigator.appName);
		alert("appVersion=" + window.navigator.appVersion + "||appMinorVersion=" + window.navigator.appMinorVersion );
		alert("platform=" + window.navigator.platform + "||appCodeName=" + window.navigator.appCodeName + "||appName=" +window.navigator.appName);
	}
	
	
	alert("You are using " + window.navigator.appName + " (" + search + " " + sCookieValue + ")");
	alert("Cookies are " + ((window.navigator.cookieEnabled)?"":"not ")  + "enabled");
	//alert("ColorDepth = " + window.screen.colorDepth);
	alert("Your desktop screen resolution is " + window.screen.width + "  x  " + window.screen.height);
	alert("UserAgent = " + window.navigator.userAgent);
	//alert(window.navigator.appVersion)
	//alert(window.navigator.appMinorVersion);
	//alert(window.navigator.platform);

	if ((!window.navigator.cookieEnabled) || (window.screen.width < 1024))
	{
		//sCookieValue = GetCookie(sCookieName);
		
		if (!bMessageOff)
		{
			alert("This Year One, Inc. website (www.yearone.com) is currently optimized to work with Microsoft Internet Explorer (version 5.5 and higher) and a true color desktop with a screen resolution of 1024 x 768 pixels.  Other browsers and desktop settings will work with this website, but may require upgrading your browser to the most current version.\n\n"
			+ "Most importantly,\t please make sure your browser:\n     a) accepts all cookies from this website; and\n     b) allows scripting in html pages.\n\n"
			+ "You are using " + window.navigator.appName + " (" + search + sCookieValue + ")\n"
			+ "Cookies are " + ((window.navigator.cookieEnabled)?"":"not ")  + "enabled\n"
			+ "Your desktop screen resolution is " + window.screen.width + "  x  " + window.screen.height
			+ "\n");
			
			// set the cookie
			if (window.navigator.cookieEnabled)
			{
				document.cookie = sCookieName + "=true; expires=" + date.toGMTString();
			}
			
//var oPopup = window.createPopup();
//function window_onload() {
//    var oPopupBody = oPopup.document.body;
//	oPopupBody.style.backgroundColor = "lightyellow";
//	oPopupBody.style.border = "solid black 1px";    
//  oPopupBody.innerHTML = "Display some <B>HTML</B> here.";
//    oPopup.show(100, 100, 200, 50, document.body);}
			
		}
	}
End of Multiline comment
*/
}  

// Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use

var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"

var bouncelimit=32 //(must be divisible by 8)
var direction="up"

function initbox(){
	if (!dom&&!ie&&!ns4) return
	crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	crossobj.top=scroll_top-250+calunits
	crossobj.visibility=(dom||ie)? "visible" : "show"
	dropstart=setInterval("dropin()",50)
}

function dropin(){
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	if (parseInt(crossobj.top)<100+scroll_top)
	crossobj.top=parseInt(crossobj.top)+40+calunits
	else{
	clearInterval(dropstart)
	bouncestart=setInterval("bouncein()",50)
	}
}

function bouncein(){
	crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits
	if (bouncelimit<0)
	bouncelimit+=8
	bouncelimit=bouncelimit*-1
	if (bouncelimit==0){
	clearInterval(bouncestart)
	}
}

function dismissbox(){
	if (window.bouncestart) clearInterval(bouncestart)
	crossobj.visibility="hidden"
}

function truebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = ""
	if (document.cookie.length > 0) {
	offset = document.cookie.indexOf(search)
	if (offset != -1) {
		offset += search.length
		end = document.cookie.indexOf(";", offset)
		if (end == -1)
		end = document.cookie.length;
		returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}

function dropornot(){
	if (get_cookie("droppedin")==""){
	window.onload=initbox
	document.cookie="droppedin=yes"
	}
}

var detect = navigator.userAgent.toLowerCase();
var browser,version,total,thestring;
var OS;
