window.defaultStatus="Thanks to everyone for coming - what a beautiful beginning!"

//Figure out the days/hours remaining
		wedding=new Date(2004, 6, 1);
		today = new Date();
		var daysRemaining;
		var hoursRemaining;
		//Set 1 day in milliseconds
		oneDay=1000*60*60*24;
		oneHour=1000*60*60;
		//calculate difference between two dates and convert to days
		daysRemaining = (Math.floor((today-wedding)/oneDay))+1;
		hoursRemaining = (Math.round((today-wedding)/oneHour));
		


//preload images from stylesheet
	title = new Image(281,86);
	title.src = "images/title.jpg"

	pixel = new Image(1,1);
	pixel.src = "images/pixel.jpg"

	heart = new Image(34,30);
	heart.src = "images/heart.jpg"

	gTitle = new Image(281,86);
	gTitle.src = "images/gTitle.jpg"

	gPixel = new Image(1,1);
	gPixel.src = "images/gPixel.jpg"

	heart = new Image(34,30);
	heart.src = "images/gHeart.jpg"

	
	
	

	//read from cookie and set style
	setStyle()
	

	//function to switch stylesheets
	
	function changeStyle(){
		if(document.styleSheets[0].disabled==false){		
			document.styleSheets[1].disabled=false;
			document.styleSheets[0].disabled=true;
			setCookie("1");
		}
		else{
			document.styleSheets[0].disabled=false;
			document.styleSheets[1].disabled=true;
			setCookie("2");
		}
	}

	function setStyle(){
		var style;
		style = readCookie();
		if(style==2){
			document.styleSheets[1].disabled=true;
			}
		else
			document.styleSheets[0].disabled=true;
		}	

	function readCookie(){
		var readCookie;
		var splitCookie;
		readCookie = document.cookie;
		readCookie = unescape(readCookie);
		splitCookie = readCookie.split(":");
    		return splitCookie[1];
		}

	function setCookie(value){
		var newCookie;
		newCookie = "allison-and-karl.com:" + value + ";"
		var expire = new Date();
		expire.setTime(expire.getTime() + 365 * 24 * 60 * 60 * 1000);
		newCookie = newCookie + "expires=" + expire.toGMTString();
		document.cookie = newCookie;
		}

