function setzCookie(c_name,value,expiredays)
{var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toGMTString()+";path=/");}
function getzCookie(c_name)
{if(document.cookie.length>0)
{c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1)
{c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));}}
return"";}
function square_get()
{var comboValue
var selIndex=document.getElementById('square_selector').selectedIndex;comboValue=document.getElementById('square_selector').options[selIndex].value
setzCookie('square_theme',comboValue,30)
setStylesheet(comboValue);}
var fred=getzCookie('square_theme')
function setStylesheet(title)
{var i,cacheobj,altsheets=[""];for(i=0;(cacheobj=document.getElementsByTagName("link")[i]);i++)
{if(cacheobj.getAttribute("rel").toLowerCase()=="alternate stylesheet"&&cacheobj.getAttribute("title"))
{cacheobj.disabled=true;altsheets.push(cacheobj);if(cacheobj.getAttribute("title")==title)
cacheobj.disabled=false;}}
return;}
function square_togglemenu(sq_menu){if($('sq_'+sq_menu).className=='menu_caption_open'){savestate(sq_menu,'on');Effect.BlindDown(sq_menu,{duration:1.0,afterFinish:function(){$('sq_'+sq_menu).removeClassName('menu_caption_open');$('sq_'+sq_menu).addClassName('menu_caption_close');}});}else{savestate(sq_menu,'off');Effect.BlindUp(sq_menu,{duration:1.0,afterFinish:function(){$('sq_'+sq_menu).removeClassName('menu_caption_close');$('sq_'+sq_menu).addClassName('menu_caption_open');}});}}
function savestate(menuname,setting){sq_currentstate.set(menuname,setting);sq_json=sq_currentstate.toJSON();setzCookie('sq_getsavedstate',sq_json,2)}

function font_get(font_sizer)
{
	if(font_sizer=='small')
	{
		setzCookie('newdc','small',30)
		document.getElementById('font_small').src=newdc_themepath+'small_active.png';
		document.getElementById('font_medium').src=newdc_themepath+'medium_inactive.png';
		document.getElementById('font_large').src=newdc_themepath+'large_inactive.png';
		setStylesheet('small');
	}
	if(font_sizer=='medium')
	{
		setzCookie('newdc','medium',30)
		document.getElementById('font_small').src=newdc_themepath+'small_inactive.png';
		document.getElementById('font_medium').src=newdc_themepath+'medium_active.png';
		document.getElementById('font_large').src=newdc_themepath+'large_inactive.png';
		setStylesheet('medium');
	}
	if(font_sizer=='large')
	{
		setzCookie('newdc','large',30)
		document.getElementById('font_small').src=newdc_themepath+'small_inactive.png';
		document.getElementById('font_medium').src=newdc_themepath+'medium_inactive.png';
		document.getElementById('font_large').src=newdc_themepath+'large_active.png';
		setStylesheet('large');
	}
	location.reload();
}
var fred=getzCookie('newdc')


//function initialize(dLat, dLng, dzoom) {
//	if($('map_canvas')){
//
//		var dLat="53.407946";
//		var dLng="-2.979484";
//		var dzoom=14;
//
//		var myOptions = {
//			zoom: this.dzoom,
//			center: new google.maps.LatLng(this.dLat,this.dLng),
//			mapTypeId: google.maps.MapTypeId.HYBRID
//		};
//
//		var map = new google.maps.Map(document.getElementById("map_canvas"),
//				myOptions);
//		setMarkers(map, locations);
//	}
//}


// end function initialize
