/*	-------------------------------------------------------------
	Ask4events
	-------------------------------------------------------------	*/
	
	
/*	-------------------------------------------------------------
	function getCookie(), setCookie(), deleteCookie()
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Description:	Yes, these functions are used for handling
					cookies.
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/
		
		<!--
		function getCookie(CookieName) {
			var start = document.cookie.indexOf(CookieName + '=');
			var len = start + CookieName.length + 1;
			if ((!start) && (CookieName != document.cookie.substring(0,CookieName.length)))
				return null;
			if (start == -1)
				return null;
			var end = document.cookie.indexOf(';',len);
			if (end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(len,end));
		}

		function setCookie(CookieName,value,expires,path,domain,secure) {
			document.cookie = CookieName + "=" +escape(value) +
			( (expires) ? ";expires=" + expires : "") +
			( (path) ? ";path=" + path : "") + 
			( (domain) ? ";domain=" + domain : "") +
			( (secure) ? ";secure" : "");
		}

		function deleteCookie(CookieName,path,domain) {
			if (getCookie(CookieName))
				document.cookie =
				CookieName + '=' +
				( (path) ? ';path=' + path : '') +
				( (domain) ? ';domain=' + domain : '') +
				';expires=Thu, 01-Jan-1970 00:00:01 GMT';
		}
		//-->
	
/*	-------------------------------------------------------------
	function getBrowserWidth()
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Description:	As odd as it may seem, this function returns
					the browser's width in pixels.
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Credits:		Script found on Particle Tree
					http://www.particletree.com
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/
	
		<!--
		function getBrowserWidth(){
			if (window.innerWidth){
				return window.innerWidth;}	
			else if (document.documentElement && document.documentElement.clientWidth != 0){
				return document.documentElement.clientWidth;	}
			else if (document.body){return document.body.clientWidth;}		
				return 0;
		}
		//-->

/*	-------------------------------------------------------------
	function determineStyle()
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Description:	With this here function we can swap styles.
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Credits:		Script found on A List Apart
					http://www.alistapart.com
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/
	
		<!--
		function determineStyle(){
			
			var browserWidth = getBrowserWidth();
				
			var i, a, main;
			
			if (browserWidth <= 1015){
				for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
					if(a.getAttribute("rel").indexOf("style") != -1
					&& a.getAttribute("title")) {
						a.disabled = true;
						if(a.getAttribute("title") == "narrow") a.disabled = false;
					}
				}
			}
			
			if (browserWidth > 1015){
				for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
					if(a.getAttribute("rel").indexOf("style") != -1
					&& a.getAttribute("title")) {
						a.disabled = true;
						if(a.getAttribute("title") == "wide") a.disabled = false;
					}
				}
			}
		}
		//-->
	

/*	-------------------------------------------------------------
	function setLinkAttributes()
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Description:	setLinkAttributes finds ALL anchor links and
					can set new attributes. The following script
					specifically finds anchor links labeled as
					external, and add a terget="_blank". We do
					in order to validate in XHTML 1.1 Strict.
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	Credits:		Script found on Site Point (I think)
					http://www.sitepoint.com
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -	*/
	
		<!--
		function setLinkAttributes(switchLinks) {
			if (switchLinks == "true") {
				if (!document.getElementsByTagName) return;
				var anchors = document.getElementsByTagName("a");
					for (var i=0; i<anchors.length; i++) {
					var anchor = anchors[i];
					
					//if (anchor.getAttribute("href") && ( anchor.getAttribute("rel") == "external" || anchor.getAttribute("rel") == "nofollow" ) ) {
					//	anchor.target = "_blank";
					//}
					
					if (anchor.getAttribute("href") && ( anchor.getAttribute("rel") == "external" ) ) {
						anchor.target = "_blank";
					}
				}
			} else {
				if (!document.getElementsByTagName) return;
				var anchors = document.getElementsByTagName("a");
					for (var i=0; i<anchors.length; i++) {
					var anchor = anchors[i];
					
					if (anchor.getAttribute("href") && ( anchor.getAttribute("rel") == "external" || anchor.getAttribute("rel") == "nofollow" ) ) {
						anchor.target = "_self";
					}
				}
			}
		}
		
		function toggleLinkAttributes() {
			var ExpireLongTerm = new Date();
			var ExpireLongTermValue = new Date(ExpireLongTerm.getTime()+(1000 * 60 * 60 * 360000));
			
			if ( getCookie("externalLinks") == "true" ) {
				setLinkAttributes("false");
				setCookie("externalLinks","false",ExpireLongTermValue);
			} else if (getCookie("externalLinks") == "false") {
				setLinkAttributes("true");
				setCookie("externalLinks","true",ExpireLongTermValue);
			} else if ( !getCookie("externalLinks") ) {
				setLinkAttributes("true");
				setCookie("externalLinks","true",ExpireLongTermValue);
			}
		}
		//-->
	
	<!-- 
		function doOnResize () {
			determineStyle();
			setTall();
		}
		
		function doOnLoad () {
			determineStyle();
			//if ( getCookie("externalLinks") ) {
			//	setLinkAttributes( getCookie("externalLinks") );
			//}
			setTall();
			setLinkAttributes("true");
		}
			
	//-->