var objectTag = "";

function flashWrite(swf_name,swf_file,swf_width,swf_height) {
	var objectTag = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+swf_width+"' height='"+swf_height+"' id='"+ swf_name +"' align='middle'><param name='allowScriptAccess' value='always'><param name='movie' value='" + swf_file +"'><param name='quality' value='high'><param name='bgcolor' value='#000000'><embed src='" + swf_file +"' quality='high' bgcolor='#000000' width='"+swf_width+"' height='"+swf_height+"' name='"+ swf_name +"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></object>";
	document.write(objectTag);
	objectTag = "";
}

function popup() {
	window.open('popup/popup.html','retail','width=695,height=582,scrollbars=no');
}



function shine_goscreen(){
    var uagent = navigator.userAgent;
    if(uagent.indexOf("NT 5.1") > 0 || uagent.indexOf("NT 5.2") > 0 || uagent.indexOf("NT 6.0") > 0) {
        window.open('main.html','main','fullscreen=yes'); return;
    }
    window.open('main.html','main','toolbar=no,location=no' );
}

function main_init() {
  var uagent = navigator.userAgent;
  if(window.screen) {
    var d = document.getElementById("divSwf");
    var sizefix = 20;
    var sizewfix = sizefix;
    var sizehfix = sizefix;
    var stdwidth = 970;
    var stdheight = 600;
    if(window.screen.width <  stdwidth || window.screen.height < stdheight) {
        d.style.width=stdwidth;
        d.style.height=stdheight;
    } else {
        if(uagent.indexOf("MSIE 6.0") < 0) {
	        d.style.width=window.screen.width - sizewfix;
    		d.style.height=window.screen.height - sizehfix;
    	}
	//vista
        if(uagent.indexOf("NT 6.0") > 0) {
	        d.style.width = window.screen.width - 100;
    		d.style.height = window.screen.height - 100;
    	}
    }
  }
}



	function shine_init() {
		var URLen="main.html";
		var windowNamen="main";
		var browserName=navigator.appName;
		var operatingSystem=navigator.platform;
		var version = parseFloat(navigator.appVersion);

		// Netscape check version 4.0+ on Win
		if (browserName.indexOf("Netscape")!=-1 && version>=4.0 && operatingSystem.indexOf("Mac")!=-1)
		 {
		 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
		 }

		// MSIE Mac check
		else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Mac")!=-1)
		 {
		 window.open(URLen,windowNamen,'titlebar=no,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availWidth+',screenX=0,screenY=0,top=0,left=0')
		 }

		// Netscape Mac check
		else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Mac")!=-1)
		 {
		 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
		 }

		// MSIE Windows
		else if (browserName.indexOf("Microsoft Internet Explorer")!=-1 && operatingSystem.indexOf("Win")!=-1)
		 {
		 //window.open(URLen,windowNamen,'fullscreen=yes')
		var win = window.open(URLen,windowNamen,'fullscreen=yes, titlebar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scroll=0,scrollbars=0,resizable=0,top=0,left=0,width=' + window.screen.availWidth+',height='+window.screen.availHeight+',screenX=0,screenY=0,top=0,left=0, statusbar=0')
			win.resizeTo(screen.width, screen.height);
			 //win.moveTo(1, 1);
			 //win.moveTo(0, 0);
			 //win.resizeTo(screen.width, screen.height);
		 }

		// Netscape Windows
		else if (browserName.indexOf("Netscape")!=-1 && operatingSystem.indexOf("Win")!=-1)
		 {
		 window.open(URLen,windowNamen,'width='+screen.width+',height='+screen.height+',top=0,left=0');
		 }

		else
		 {
		 window.open(URLen,windowNamen);
		 }

	}
