<!-- resizer -->
wraphandler = {
	init: function() {
		if (!document.getElementById) return;
		// set up the appropriate wrapper
		wraphandler.setWrapper();
		// and make sure it gets set up again if you resize the window
		wraphandler.addEvent(window,"resize",wraphandler.setWrapper);
	},

	setWrapper: function() {
		var theWidth = 0;
		if (window.innerWidth) {
			theWidth = window.innerWidth
		} else if (document.documentElement && document.documentElement.clientWidth) {
			theWidth = document.documentElement.clientWidth
		} else if (document.body) {
			theWidth = document.body.clientWidth
		}
		if (theWidth != 0) {
			if (theWidth < 890) {
				document.getElementById('main-container').className = 'narrow';
				document.getElementById('main-container-footer').style.display = 'none';
				document.getElementsByTagName('body')[0].style.backgroundColor = '#ffffff';
			} else {
				document.getElementById('main-container').className = 'wide';
				document.getElementById('main-container-footer').style.display = 'block';
				document.getElementsByTagName('body')[0].style.backgroundColor = '#81aacd';
			}
		}
	},

	addEvent: function( obj, type, fn ) {
		if ( obj.attachEvent ) {
			obj['e'+type+fn] = fn;
			obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
			obj.attachEvent( 'on'+type, obj[type+fn] );
		} else {
			obj.addEventListener( type, fn, false );
		}
	}
}

wraphandler.addEvent(window,"load",wraphandler.init);


<!-- layer -->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}




<!-- pop up -->

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=510,height=500');");
}

