	
	function popUp(url,name,w,h) {
		winLeft = (screen.width-w)/2;
		winTop = (screen.height-(h))/2; 
		window.open(url,name, 'width=' + w + ',height=' + h + ',left=' + winLeft + ',top=' + winTop+ ',scrollbars=0,status=0,location=0,resizeable=0,toolbar=0');
	}
	
	function openFull(url,name) {
		l = 0;
		if (screen.width) {
			
			w = screen.width;
			h = screen.height-50;

			if (w>980) {
				pagesize='lrg';
			} else {
				pagesize='sml';
			}
			
		} else {
			pagesize='sml';
		}

		if (pagesize=='lrg') {
			w=w;
			h=h;
		} else {
			w=980;
			h=630;
		}
		
		window.open(url,name, 'width=' + w + ',height=' + h + ',left=' + l + '0,top=0,scrollbars=1,status=0,location=0,resizable=1,toolbar=0');
	}
	
	function getWindowSize(){
	
		var myWidth = 0, myHeight = 0;
		
		if( typeof( window.innerWidth ) == 'number' ) {
		
			//Non-IE
			myWidth = window.innerWidth;
			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 {w:myWidth,h:myHeight};
		
	}
	
	function MWJ_findObj( oName, oFrame, oDoc ){
	
		/* if not working on a layer, document should be set to the
		document of the working frame
		if the working frame is not set, use the window object
		of the current document
		WARNING: - cross frame scripting will cause errors if
		your page is in a frameset from a different domain */
	 
		if( !oDoc ) { if( oFrame ) { oDoc = oFrame.document; } else { oDoc = window.document; } }
	
		//check for images, forms, layers
		if( oDoc[oName] ) { return oDoc[oName]; }
	
		//check for pDOM layers
		if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
	
		//check for DOM layers
		if( oDoc.getElementById && oDoc.getElementById(oName) ) {
			return oDoc.getElementById(oName);
		}
	
		//check for form elements
		for( var x = 0; x < oDoc.forms.length; x++ ) {
			if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; }
		}
	
		//check for anchor elements
		//NOTE: only anchor properties will be available,
		//NOT link properties (in layers browsers)
		for( var x = 0; x < oDoc.anchors.length; x++ ) {
			if( oDoc.anchors[x].name == oName ) {
				return oDoc.anchors[x];
			}
		}
	
		//check for any of the above within a layer in layers browsers
		for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
			var theOb = MWJ_findObj( oName, null, oDoc.layers[x].document );
			if( theOb ){
				return theOb;
			}
		}
	
		//check for frames, variables or functions
		if( !oFrame && window[oName] ) { return window[oName]; }
		if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
	
		//if checking through frames, check for any of the above within
		//each child frame
		for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
			var theOb = MWJ_findObj( oName, oFrame.frames[x], oFrame.frames[x].document );
			if( theOb ){
				return theOb;
			}
		}
	
		return null;
		
	}