/*
function loadArchive(city,year,month){
	window.open('./city='+city+'&amp;year='+year+'&amp;month='+month+'&amp;','_self');
}
*/
function checkURL(){
	// Create variable is_input to see if there is a # in the url
	var is_input = document.URL.indexOf('#');
	// Check the position of the ? in the url
	if (is_input != -1) { 
		// Create variable from # to the end of the string
		addr_str = document.URL.substring(is_input+1, document.URL.length);
		alert(addr_str);
		//return addr_str;
	}
}
function showCity(city){
	if(document.getElementById(city).style.display != "block"){
		document.getElementById(city).style.display = 'block';
	} else {
		document.getElementById(city).style.display = 'none';
	}
}
function checkQuery(){
	if(document.queryForm.query.value !="") {
		return true;
	} else {
		alert('Please type a keyword to search');
	}
}
function expand(nb){
	var new_div = 'r'+nb+'_div';
	var new_btn = 'btn'+nb;
	if(document.getElementById(new_div).style.height !='100%'){
		document.getElementById(new_div).style.height = '100%';
		document.getElementById(new_btn).innerHTML = "<a class='divbtn' href=\"javascript:expand("+nb+");\">Minimize Article</a>";
		
	} else {
		document.getElementById(new_div).style.height = '200px';
		document.getElementById(new_btn).innerHTML = "<a class='divbtn' href=\"javascript:expand("+nb+");\">Read More...</a>";
	}
	document.getElementById(new_btn).className='tabdiv';
}
/*
function resize(tot){
	for(var i=1;i<tot;i++){
		if(document.getElementById(new_div).style.height){
			
			
			*/