/* ------------------------------------------------------------------
-- Generic Scripts
-- 
-- Slot Nuts Casino
------------------------------------------------------------------ */
function ShowDownload()
{
		var adId = "";
		var strM = "DOWNLOAD our FREE SOFTWARE while surfing our site?";
		var strDownload = "html/getstarted.html";
		if(getCookie("download") == "")
		{
			document.cookie = "download=yes";
			if (window.confirm(strM))
			{				
				strDownload = (adId != "") ? strDownload + "?affid=" + adId : strDownload;				
				document.location = strDownload;
			}
		}
}

function BookmarkPage(){
	var strBookUrl = "http://www.SlotNuts.com";
	var strBookTxt = "Slot Nuts Casino";
	
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')) {
		// NS6+
	    window.sidebar.addPanel (strBookTxt,'http://'+strBookUrl,'');
	} else if( window.external && navigator.platform == 'Win32' ) {
		// IE
    	window.external.AddFavorite( location.href, strBookTxt );
	}else if( window.opera && window.print ) {
		//OPER 6+
		return true;
	} else if( document.layers ) {
		// NS 4-
    	window.alert( 'Please click OK then press Ctrl+D to create a bookmark.' );
	}
}

function getCookie(nameP){
	if (document.cookie.length > 0){
		// check if there are any 
		offset = document.cookie.indexOf(nameP);
		if (offset != -1){
			// if cookie exists
			offset += nameP.length;
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset);
			// set index of end of cookie value
			if (end == -1){
				end = document.cookie.length;
			}
			return unescape(document.cookie.substring(offset, end))
			}
	}
	return "";
}