jQuery.noConflict();
var w$ = jQuery;

w$.open = {
	init: function() {
		for (module in w$.open) {
			if (w$.open[module].init){
				w$.open[module].init();
			}
		}
	}
};

w$(document).ready(w$.open.init);

w$.open.click = {
	init: function() {
		w$('A[rel="special"]')
			.bind('click', this.click)
	},
	click: function() {
		var width=1280;
		var height=720;
		var target_width=window.screen.width;
		var target_height=window.screen.height;
/*
		var target_width;
		var target_height;
		if( typeof( window.innerWidth ) == 'number' ) {
		  //Non-IE
		  target_width = window.innerWidth;
		  target_height = window.innerHeight;
		} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		  //IE 6+ in 'standards compliant mode'
		  target_width = document.documentElement.clientWidth;
		  target_height = document.documentElement.clientHeight;
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		  //IE 4 compatible
		  target_width = document.body.clientWidth;
		  target_height = document.body.clientHeight;
		}
		alert(target_width);
		alert(window.screen.width);
*/
		var features="location=no, menubar=no, status=no, scrollbars=no, resizable=no, toolbar=no";
		if (width) {
			if (target_width > width){
				features+=", left="+(target_width-width)/2;
			}else{
				features+=", left=0";
				width=target_width;
			}
			features+=", width="+width;
		}
		if (height) {
			if (target_height > height){
				features+=", top="+(target_height-height)/2;
			}else{
				features+=", top=0";
				height=target_height;
			}
			features+=", height="+height;
		}
		var open_win = window.open(this.href, "main", features);
		open_win.focus();
		return false;
	}
};

function cng(){
	w$("#flashcontent").css("display","none");
	w$("#enter").css("display","block");
	w$("body").css("background-image","url(./images/archimode.gif)");
};

function getAgent() {  
	var ua = "";  
	ua = navigator.userAgent.toLowerCase();  
	return ua;  
}
function windowOpenFix(t){
	var width=1280;
	var height=720;
	var target_width=window.screen.width;
	var target_height=window.screen.height;
	var features="location=no, menubar=no, status=no, scrollbars=no, resizable=no, toolbar=no";
	if (width) {
		if (target_width > width){
			features+=", left="+(target_width-width)/2;
		}else{
			features+=", left=0";
			width=target_width;
		}
		features+=", width="+width;
	}
	if (height) {
		if (target_height > height){
			features+=", top="+(target_height-height)/2;
		}else{
			features+=", top=0";
			height=target_height;
		}
		features+=", height="+height;
	}
	var open_win = window.open(t, "slideshow", features);
	open_win.focus();
	return false;
}
