
function openSite() {
	
	var queryString=(document.location).toString().split("?")[1];

	/*now then. let's look at doing this properly.*/
	
		var screen_height = screen.height;
		var screen_width = screen.width;

		var url = "";
		
		var buffer = (document.all || document.layers) ? 30 : 48;

		if (screen_height <= 600) {
			//alert("i'm small screen");
			screen_width = 800;
			screen_height = 600;
			var window_width =  800-12;
			var window_height = 600-buffer;
			
			url = "site_small.html";

    			} else {
       				url = "site.html";
        		
    				//var window_width =  1000;
				//var window_height = 720;
        		
    				var window_width =  screen.availWidth-10;
				var window_height = screen.availHeight;  
        		
    			}
    		
		var win = "winVisionaire";
		var features = "toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=no,left=0,top=0,width=" + window_width + ",height=" + window_height;
		
		
		/*if (browser == "Internet Explorer" && OS == "Windows") {
			features += ",fullscreen=yes";
		}*/
		
		window.open(url+"?"+queryString,win,features);
		
	

}




function resizeThis() {
	if (browser != "Internet Explorer" && OS != "Windows") {
		window.moveTo(0,0);
		if (document.all) {
			window.resizeTo(screen.availWidth,screen.availHeight);
		} else if (document.layers||document.getElementById) {
			if (window.outerHeight<screen.availHeight||window.outerWidth<screen.availWidth) {
				window.outerHeight = screen.availHeight;
				window.outerWidth = screen.availWidth;
			}
		}
	} else {
		//alert("i'm in else");
		window.moveTo(0,0);
		//alert("availWidth = " + screen.availWidth);
		window.resizeTo(screen.availWidth,screen.availHeight);

	}
}



function ScreenSizeDetect() {
	//alert("i'm in ScreenGoToURL");
	var screen_height = screen.height;
	var screen_width = screen.width;

	var buffer = (document.all || document.layers) ? 30 : 48;

	if (screen_height <= 600) {
		alert("i'm small screen");
		screen_width = 800;
		screen_height = 600;
		var window_width =  800-12;
		var window_height = 600-buffer;
		var window_top = 0;
    	var window_left = 0;
    }
}
