portal_url = 'http://www.altcontrol.nl';

// <![CDATA[

/* Include scripts 
------------------------------------------ */
document.write("<"+"script type='text/javascript' src='" + portal_url + "/scriptShowHide.js'><"+"/script>");
document.write("<"+"script type='text/javascript' src='" + portal_url + "/flashobject.js'><"+"/script>");


/* Print function 
------------------------------------------ */
function OpenPrintPage()
{
	if (document.location == portal_url) {
		window.open(document.location + '/index_html/print_view');
	} else {
		window.open(document.here_url + '/print_view?' + document.query_string);
	}
}

/* Insert flash header animation, or img if not supported
------------------------------------------ */
function insertFlash() {
	img_noflash = "<img src='" + portal_url + "/no_flash.jpg' alt='Websites, een succes door eenvoud en relevantie' />";
	var fo = new FlashObject("acc_flash_02.swf", "acc_flash", "758", "145", 6, "#4B75A1", img_noflash);
	fo.write("flashcontent");
}

/* Place footer at bottom of page
------------------------------------------ */
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('page').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}

window.onload = function() {
	setFooter();
	insertFlash();

}
window.onresize = function() {
	setFooter();
}

/* Switch textsize (normal-large-largest)
------------------------------------------ */
// Cookie
function chooseStyle (newstyle){
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (1000*3600*24*365));
	document.cookie = 'style=' + newstyle + '; expires=' + expdate.toGMTString() + '; path=/';
	//alert ('This style choice will persist for a year unless changed again.');
       try
       {
            // Also reload other frames.
            for(i = 0; i < parent.frames.length; i++)
            {
                if(parent.frames[i] == self)
                    continue;
                parent.frames[i].location = parent.frames[i].location;
            }
        } catch(e) { }
        target_url = self.location;
        self.location = target_url;
}

if(document.cookie.indexOf('style=1')>=0) 
  document.write('<link rel="stylesheet" type="text/css" href="styleTextLarge.css">\n');
else if (document.cookie.indexOf('style=2')>=0)
  document.write('<link rel="stylesheet" type="text/css" href="styleTextLargest.css">\n');

/*else 
  document.write('<link rel="stylesheet" type="text/css" href="styleCustom.css">\n');
*/



/* The end..
------------------------------------------ */


// ]]>
