/* fontsize */
	var font_size = 100;
	
	function setFontsize()
	{
		var container = document.getElementById( 'wrapper' );
		container.style.fontSize = font_size + '%';
	}
	
	function changeFontsize( delta )
	{
		font_size += ( delta * 10 );
		
		if( font_size < 100 ) font_size = 100;
		if( font_size > 140 ) font_size = 140;
		
		setFontsize();
		setCookie("fontSize", font_size );
	}
	
	/* Module Set Default Font Size (void) */
	function setDefaultFontSize()
	{
		var cookie_fontsize = getCookie( "fontSize" );
		
		if( cookie_fontsize )
		{
			font_size = parseInt( cookie_fontsize );
			setFontsize();
		}
	}
	
	/* Module Set Cookie (string, string, int) -- http://www.w3schools.com/js/js_cookies.asp */
	function setCookie( c_name, value )
	{
		document.cookie = c_name + "=" + value;
	}
	
	/* Module Get Cookie (string) -- http://www.w3schools.com/js/js_cookies.asp */
	function getCookie( 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 false;
	}

	function setIframeHeight(iframeName)
	{
		//var iframeWin = window.frames[iframeName];
		var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
				
		//alert('iframeName ' + iframeName);
		//alert('iframeEl ' + iframeEl);
		//alert('iframeEl.height ' + iframeEl.style.height);
					
		if (iframeEl)
		{
			iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous
			//var docHt = getDocHeight(iframeWin.document);
			// need to add to height to be sure it will all show
			var h = alertSize();
			var new_h = (h + 200);
		//alert('new_h ' + new_h);
			iframeEl.style.height = new_h + "px";
			//alertSize();
		}
	}

	function alertSize()
	{
	  var myHeight = 0;
		var scrollHeight = 0;
/*
if (obj.document)
{
	//alert('iframe.document.body.innerHTML = ' + obj.document.body.innerHTML);
}
else if (obj)
{
	//alert('obj = ' + obj.scrollHeight); //contentDocument.body.innerHTML);
} 
*/
		if( typeof( window.innerWidth ) == 'number' )
		{
	    //Non-IE
	    myHeight = window.innerHeight;
	  }
		else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		{
	    //IE 6+ in 'standards compliant mode'
	    myHeight = document.documentElement.clientHeight;
	  }
		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		{
	    //IE 4 compatible
	    myHeight = document.body.clientHeight;
	  }
		  
//alert( 'Height = ' + myHeight );
	  return myHeight;
	}
		
