﻿function gmobj(o){
	        if(document.getElementById){
		        m=document.getElementById(o);
	        }
	        else if(document.all){
		        m=document.all[o];
	        }else if(document.layers){
		        m=document[o];
	        }
	        return m;
        }

		function write2Slide(url, imgPath) {
			if(document.body.clientWidth > 1024) {

				var br = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0";
				var offLeft = 0;
				offLeft = (document.body.clientWidth - 980)/2;
				
				if (br.match("MSIE")) {
					offLeft = (document.body.clientWidth - 970)/2;
					if (br.match("MSIE 6") || br.match("MSIE 5")) {
						gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  class='divFixed divFixedBg_IE6' id='divL' style='z-index:9999;width:" + offLeft + "px;height:" + document.body.clientHeight + "px;'></div>";
						gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  class='divFixed_R divFixedBg_RIE6' id='divR' style='width:" + offLeft + "px;height:" + document.body.clientHeight + "px;'></div>";		
					}
					else {
						gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  class='divFixed divFixedBg_IE' id='divL' style='z-index:9999;width:" + offLeft + "px;height:" + document.body.clientHeight + "px;'></div>";
						gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  class='divFixed_R divFixedBg_RIE' id='divR' style='width:" + offLeft + "px;height:" + document.body.clientHeight + "px;'></div>";		
					}
				}
				else {
					offLeft = (document.body.clientWidth - 1010)/2;
					gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  id='divL' style='z-index:9999;position:fixed; float: left; left:0px; top: 0px; cursor:pointer; background-color:#FFFFFF; background:transparent url(" + imgPath + ") no-repeat fixed center 0 !important;width:" + offLeft + "px;height:" + window.screen.height + "px;'></div>";
					gmobj("divResult").innerHTML += "<div onclick='window.open(" + '"' + url + '"' + ")'  id='divR' style='position:fixed; float: right; right:0px; top:0px; cursor:pointer; background-color:#FFFFFF; background:transparent url(" + imgPath + ") no-repeat fixed center 0 !important;width:" + offLeft + "px;height:" + window.screen.height + "px;'></div>";
				}
			} 
			else {
				gmobj("divResult").innerHTML = "";
			}
		}
