// Create namespace
if ( ! window.nl.site ) {
	window.nl.site = {} ;
} ;

/**
 * Site Class
 */
nl.site.Site = function() {
	nl.xd.util.Event.addListener( window , 'load' , function() { nl.site.Site.DOC.show() ; } ) ;
} ;

/**
 * DOC Class
 */
nl.site.Site.DOC = function() {
	var flash ;
	
	return {
		show: function() {
			this.showMainMenu( 270, 900 );
			
			try {
				document.execCommand( 'BackgroundImageCache' , false , true ) ;
			} catch( e ) {} ;

			// replace h1 tags
			sIFR.replaceElement(named({ sSelector:"h1", sFlashSrc:"swf/helvetica_77bc.swf", sColor:"#FC1921;", sLinkColor:"#000000", sBgColor:"#FFFFFF", sWmode: "transparent", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
			sIFR.replaceElement(named({ sSelector:"h2", sFlashSrc:"swf/topbar.swf", sColor:"#ffffff", sLinkColor:"#008778", sBgColor:"#FFFFFF", sWmode: "transparent", sHoverColor:"#b6d400", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
//			sIFR.replaceElement(named({ sSelector:"h3", sFlashSrc:"swf/helvetica_77bc.swf", sColor:"#000000;", sLinkColor:"#000000", sBgColor:"#FFFFFF", sWmode: "transparent", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
		} ,
		showMainMenu:function( w, h ){
			var flashvars = {
			 	mm:window.mm,
				path:"",
				w:w,
				h:h
			};
			var params = {
			  menu: "false",
			  wmode: "transparent"
			};
			var attributes = {
			  id: "mainmenu_swf",
			  name: "mainmenu_swf"
			};
			swfobject.embedSWF("swf/mainmenu.swf", "mainmenu_flash", w, h, "8.0.0", "swf/expressInstall.swf", flashvars, params, attributes);
		},
		getWindowSize: function() { 
			  var myWidth = 0, myHeight = 0;
			  if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				if( BrowserDetect.OS == "Windows" ){
					myWidth = window.innerWidth - 16; /* compensate for scroll */
				} else {
					myWidth = window.innerWidth - 14; /* compensate for scroll */
				}
				myHeight = window.innerHeight;
			  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			  }
 			return [myWidth,myHeight];
		}
	}
} () ;

new nl.site.Site() ;