function Querystring()
{
	var querystring=location.search.substring(1,location.search.length);
	var args = querystring.split('&');
	for (var i=0;i<args.length;i++)
	{
		var pair = args[i].split('=');
		temp = unescape(pair[0]).split('+');
		name = temp.join(' ');
		temp = unescape(pair[1]).split('+');
		value = temp.join(' ');
		this[name]=value;
	}
	this.get=Querystring_get;
}

function resizeThis() {
	window.moveTo(0,0);
	if (document.all) {
			top.window.resizeTo(screen.availWidth,screen.availHeight);
	} else if (document.layers||document.getElementById) {
			if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth) {
				top.window.outerHeight = screen.availHeight;
				top.window.outerWidth = screen.availWidth;
			}
	}
}

function Querystring_get(strKey,strDefault)
{
	var value=this[strKey];
	if (value==null)
	{
		value=strDefault;
	}
	return value;
}

function openSite(quality) {
		var screen_height = screen.height;
		var screen_width = screen.width;
		//alert("screen.availWidth = " + screen.availWidth);
		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 =  screen.availWidth;
			var window_height = screen.availHeight;
			if (quality == "highres")
			{
			url = "small_high.htm";
			} else if (quality == "lowres")
			{
			url = "small_low.htm";
			}
			
     	} else {
     		//alert("i'm big");
       		if (quality == "highres")
			{
			url = "big_high.htm";
			} else if (quality == "lowres")
			{
			url = "big_low.htm";
			}
			//var window_width =  1000;
			//var window_height = 720;
     		var window_width =  screen.availWidth;
			var window_height = screen.availHeight;
		}
		var winSubline = "winSubline";
		var features = "toolbar=no,location=no,top=0,left=0,status=no,menubar=no,scrollbars=no,resizable=no,width=" + window_width + ",height=" + window_height;
		
		/*
		if (browser == "Internet Explorer" && OS == "Windows") {
			features += ",fullscreen=yes";
		}*/
		window.open(url,winSubline,features);
		window.moveTo(0,0);

}

function runFoo(openType)
{
		var qs = new Querystring()
		var queries = '?language='+qs.get("language","english");
	
	if (openType=="big_hi") {
				var src = 'subline_new.swf';
				document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" name="subvisions" width=1024 height=615 id="subvisions">');
				document.write('<PARAM NAME="movie" VALUE="'+src+queries+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#000000">');
				document.write('<EMBED src="'+src+queries+'" WIDTH="1024" HEIGHT="615" ALIGN="" quality=high bgcolor=#000000 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" NAME="subvisions"></EMBED>');
				document.write('</OBJECT>');
	} else if (openType=="big_lo") {
				var src = 'subline_low.swf';
				document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" name="subvisions" width=1024 height=615 id="subvisions">');
				document.write('<PARAM NAME="movie" VALUE="'+src+queries+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#000000">');
				document.write('<EMBED src="'+src+queries+'" WIDTH="1024" HEIGHT="615" ALIGN="" quality=high bgcolor=#000000 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" NAME="subvisions"></EMBED>');
				document.write('</OBJECT>');
	} else {
				var src = 'subline_new.swf';
				document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 		codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" name="subvisions" width=960 height=768 id="subvisions">');
				document.write('<PARAM NAME="movie" VALUE="'+src+queries+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#000000">');
				document.write('<EMBED src="'+src+queries+'" WIDTH="960" HEIGHT="768" ALIGN="" quality=high bgcolor=#000000 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" NAME="subvisions"></EMBED>');
				document.write('</OBJECT>');
	}
}



