function toggleClass(elemID,class_name) {
	var elem = document.getElementById(elemID);
	elem.className = class_name
}

function displayModalWindow (seasonal_id, locator_id)
{
		var w = 200;
		var h = 210;
		winname = 'Window'+'_'+Math.random()
		ColdFusion.Window.create(winname, '','/include/ajax/openinghours.cfm?locator_id='+locator_id+'&seasonal_id='+seasonal_id,
		{height:h,width:w,modal:true,closable:true,draggable:false,resizable:false,center:true,initshow:true});
}

function printContent(id){
	str=document.getElementById(id).innerHTML
	newwin=window.open('','printwin','left=100,top=100,width=645,height=800')
	newwin.document.write('<HTML><HEAD><link rel="stylesheet" type="text/css" href="/style.css" />\n<HEAD>\n')
	newwin.document.write('<TITLE>Print Page</TITLE>\n')
	newwin.document.write('<script>\n')
	newwin.document.write('function chkstate(){\n')
	newwin.document.write('if(document.readyState=="complete"){\n')
	newwin.document.write('window.close()\n')
	newwin.document.write('}\n')
	newwin.document.write('else{\n')
	newwin.document.write('setTimeout("chkstate()",2000)\n')
	newwin.document.write('}\n')
	newwin.document.write('}\n')
	newwin.document.write('function print_win(){\n')
	newwin.document.write('window.print();\n')
	newwin.document.write('chkstate();\n')
	newwin.document.write('}\n')
	newwin.document.write('<\/script>\n')
	newwin.document.write('</HEAD>\n')
	newwin.document.write('<BODY onload="print_win()">\n')
	newwin.document.write(str)
	newwin.document.write('</BODY>\n')
	newwin.document.write('</HTML>\n')
	newwin.document.close()
}

function popitup(url) {
	newwindow=window.open(url,'name','height=800,width=560,resizable=yes,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}


function expShowHideDiv(elementID,linkID,applyFocus,imgID)
{	
	var image = document.getElementById(imgID);
	var element = document.getElementById(elementID);
	var linkEl = document.getElementById(linkID);
	
	if(element.style.display=='block'){
		//jQuery(linkEl).attr('title', maximizeText);
		//jQuery(linkEl).text(maximizeText);
		jQuery(image).attr("src", "/images/arrow-right-small.png");
	}
	else if(element.style.display=='none'){
		//jQuery(linkEl).attr('title', minimizeText);
		//jQuery(linkEl).text(minimizeText);
		jQuery(image).attr("src", "/images/arrow-bottom-small.png");
	}
	else{
		//jQuery(linkEl).attr('title', maximizeText);
		//jQuery(linkEl).text(maximizeText);
		jQuery(image).attr("src", "/images/arrow-bottom-small.png");
	}


	jQuery('#'+elementID).animate({"height": "toggle"}, { duration: 600 });  

	if(applyFocus==1){
		element.focus();
	}
}

function checkCurrentPanel(id,count) {
	for (i=1;i<=count;i++) {
		if (i==id) {
			document.getElementById('paginate'+i).style.color="#000000"; 
		}
		else {
			document.getElementById('paginate'+i).style.color="#70AE1C"; 
		}
	}
	
	
}

function popitup1() {
	
	var left = (screen.width/2)-(590/2);
	var top = (screen.height/2)-(520/2);
	newwindow=window.open('/easyconsole.cfm/page/questonaire','name','location=1,status=0,scrollbars=1,titlebar=0, toolbar=0, menubar=0,width=593,height=520,top='+top+', left='+left);
	return false;
	}

