function randomLiner(){
	liners="Change is inevitable, except from a vending machine.<>There are three kinds of people: Those who can count and those who can't.<>Never answer an anonymous letter.<>We have enough youth. How about a fountain of 'Smart'?<>A clear conscience is usually the sign of a bad memory.<>Why is 'abbreviation' such a long word?<>Eat right. Stay fit. Die anyway.<>Nothing is fool proof to a sufficiently talented fool.<>If everything is coming your way, then you're in the wrong lane.<>It's bad luck to be superstitious.<>Despite the cost of living, have you noticed how it remains so popular?<>If at first you don’t succeed, don’t try skydiving.<>If Barbie is so popular, why do you have to buy her friends?<>What happens if you get scared half to death twice?<>Everywhere is in walking distance if you have the time.";
	noOfLiners=liners.split("<>").length;
	today=new Date();
	milliseconds=today.getMilliseconds();
	randomNumber=milliseconds%noOfLiners;
	return liners.split("<>")[randomNumber];
}
function randomQuestion(){
	liners="What is the currency of <a href='http://www.answers.com/Swaziland' target='_blank'>Swaziland</a>?|<a href='http://www.answers.com/topic/swazi-lilangeni' target='_blank'>Swaziland Lilangeni</a>.<>What percentage of cat owners blow dry the cat's hair after giving it a bath?|25%.<>Is it true that there are dolphins which live in the Amazon River that are pink?|Yes. They are known as <a href='http://www.answers.com/pink dolphin' target='_blank'>Botos, or Amazon River Dolphins</a>.<>Can elephants jump?|No.<>What is the world's third most popular flavor?|Orange (after chocolate and vanilla).<>What is unusual about the reproductive habits of armadillos?|They have four babies at a time which are always the same sex.<>What percentage of Americans do not know that the sun is a star?|45%.<>How many peanuts are needed to make an 18 oz. jar of peanut butter?|850.";
	noOfLiners=liners.split("<>").length;
	today=new Date();
	milliseconds=today.getMilliseconds();
	randomNumber=milliseconds%noOfLiners;
	juicyDetail=liners.split("<>")[randomNumber];
}
function imageWindow(imageName){
	imageURL="../images/content/samples/"+imageName+"_big.gif";
	var img = new Image();
	img.src = imageURL;
	screenWidth=screen.width;
	screenHeight=screen.height;
	windowWidth=700;//img.width+70;
	windowHeight=screen.height-60;//img.height+120;
	xLocation=eval(screenWidth-windowWidth)/2;
	yLocation=eval(screenHeight-windowHeight)/2;
	var win = window.open("","","width="+windowWidth+",height="+windowHeight+",screenX="+xLocation+",screenY="+yLocation+",left="+xLocation+",top="+yLocation+",resizable=1,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,alwaysRaised=1,dependent=1");
	
	win.document.open();
	
	win.document.write("<html><head><title>Big Image</title></head>");
	win.document.write("<script language='javascript'>");
	win.document.write("function sizeWindow(width, height){if(height>screen.height){height=screen.height-40}window.resizeTo(width, height);}");
	win.document.write("</script>");
	win.document.write("<BODY link='#666666' alink='#666666' vlink='#666666'>\n<table width=100% height=100% border=0 cellspacing=0 cellpadding=0>\n<tr height=100% valign=center align=center>\n<td>\n<table width='1' height='1' border='0' cellpadding='1' cellspacing='0' bgcolor='#BAB8BD'><tr> <td align='center' valign='middle'> <table border='0' cellspacing='0' cellpadding='30' bgcolor='#FFFFFF'><tr><td align='center' valign='middle'><img name='imageToDisplay' src='" + imageURL + "' border=0 onLoad='sizeWindow(document.imageToDisplay.width+120, document.imageToDisplay.height+140)'></td></tr></table> </td></tr></table>\n</td>\n</tr>\n<tr height=2% valign=center>\n<td align=center><font face='Verdana, Arial, Tahoma' size='2'><a href='javascript:window.close();'>Close</a></font></td>\n</tr>\n</table>\n</body>\n</html>\n");
	win.document.close();
}
function get_url_variable(variable_name){
	//get the entire url
	all_variables=document.location.href.split("?")[1];
	//check that there are variables
	if(typeof(all_variables)!="undefined"){
		all_variables=replace_characters(all_variables,"%26","&");
		//look at all of the variables
		for(e=0;e<all_variables.split("&").length;e++){
			if(all_variables.split("&")[e].split("=")[0]==variable_name){
				//remove the %20 characters representing a space
				return replace_characters(all_variables.split("&")[e].split("=")[1],"%20"," ");
			}
		}
	}
	return "none";
}
function replace_characters(text,findChars,replacementChars){
	newText="";
	for(r=0;r<text.length;r++){
		//Set char string to compare
		charString="";
		//starting at r, create charString to compare findChars with (according to number of chars)
		for(s=r;s<r+findChars.length&&s<text.length;s++){
			charString+=text.charAt(s);
		}
		//If the charString matches findChars
		if(charString==findChars){
			//add charString to nextText
			newText+=replacementChars;
			//and move on, starting at next unchecked char
			r=r+eval(findChars.length-1);
		}
		else{
			//Add letter to nextText
			newText+=text.charAt(r);
		}
	}
	return newText;
}
