jQuery.noConflict();

function FlotingWInit() {
  var sHtml = "";
  sHtml += '<div id="SaiyonewsFloatingW" style="display:block; left:0px; width:100%; position:absolute; top:50%; heigth:100%; z-index:999; text-align:center; vertical-align:middle;">';
//  sHtml += '<div id="SaiyonewsFloatingW" style="display:block; width:100%; height:100%; position:absolute; top:600px; left:0; padding:0; text-align:center; vertical-align:middle;">';
//  sHtml += '<div id="SaiyonewsFloatingW" style="display:block; position:absolute; width:468px; height:340px; top:50%; left:50%; margin-left: -234px; margin-top: -170px;">';
//  sHtml += '<div id="SaiyonewsFloatingW" style="position:absolute; width:468px; height:340px; top:">';
  sHtml += '<table style="background-color:transparent; border:none; padding:0; margin:0; text-align:center; vertical-align:middle" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">';
  sHtml += '<tr><td align="center" valign="middle" style="padding:0; margin:0; border:none; background-color:transparent; text-align:center; vertical-align:middle">';
  sHtml += '<embed width=468 height=340 src="' + gsFloatSwf_AN  + '" quality="high" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" salign="" FlashVars="cid=' + cid +'&bid='+ bid + '&enc=' + enc + '&swf_width=468&loadPolicyFile=' + loadPolicyFile + '&jsonPath=' + jsonPath + '&newsLinkPath=' + newsLinkPath + '&urlRequestPath=' + urlRequestPath + ' allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" width=468 height=340>';
  sHtml += '</embed>';
  sHtml += '</td></tr></table>';
  sHtml += '</div>';
  jQuery("body").append(sHtml);
}
function FloatingWOpen() {
  var mouseXm = 0;
  var mouseYm = 0;
  var VarUsrAgt = navigator.userAgent.toLowerCase();
  var isMac = (navigator.appVersion.indexOf("Mac") != -1);
  var isWin = (navigator.appVersion.indexOf("Win") != -1);
  var isX11 = (navigator.appVersion.indexOf("x11") != -1);
  var isNS4 = (document.layers) ? 1 : 0;
  var isNS6 = VarUsrAgt.indexOf("netscape6") != -1;
  var isNS7 = VarUsrAgt.indexOf("netscape/7.") != -1;
  var isIE5 = VarUsrAgt.indexOf("msie 5.") != -1;
  var isIE6 = VarUsrAgt.indexOf("msie 6.") != -1;
  var isIE7 = VarUsrAgt.indexOf("msie 7.") != -1;
  var isOP6 = VarUsrAgt.indexOf("opera 6.") != -1 || VarUsrAgt.indexOf("opera/6.") != -1;
  var isOP7 = VarUsrAgt.indexOf("opera 7.") != -1 || VarUsrAgt.indexOf("opera/7.") != -1;
  var isMZ1 = navigator.appName.indexOf("Netscape") != -1 && navigator.appVersion.charAt(0)   == 5;
  var isJS = ( (isIE5 && !isMac) || (isIE6 && !isMac) || isIE7 || isNS6 || isNS7 || isMZ1 || isOP7)
  if (isOP7) isNS4 = isNS6 = isNS7 = isIE5 = isIE6 = isMZ1 = false
  var isIEtrue = (isIE5 || isIE6 || isIE7)
  if( isIEtrue || isOP7 ){
    mouseXm = document.body.scrollLeft
    mouseYm = document.body.scrollTop
  } else if (isNS6 || isNS7 || isMZ1) {
    mouseXm = self.pageXOffset;
    mouseYm = self.pageYOffset;
  }
//alert(mouseXm +':'+ mouseYm);
  jQuery("#SaiyonewsFloatingW").css("top",mouseYm+340/2);
  jQuery("#SaiyonewsFloatingW").show();
}
function FloatingWClose() {
  jQuery("#SaiyonewsFloatingW").hide();
}
jQuery(function(){
        FlotingWInit();
        FloatingWClose();
});

//var iHtml="<object codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width=" + swf_width + " height=" + swf_height + " id='" + swfNewsFile +"' name='" + swfNewsFile +"' align='middle'
var iHtml="<object codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width=" + swf_width + " height=" + swf_height + " id='news_468_gray' name='news_468_gray' align='middle' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' /><param value='wmode' name='transparent' /><param name='movie' value='" + loadPolicyFile + swfNewsFile + "' /><param name='quality' value='high' /><param name='play' value='true' /><param name ='loop' value='true' /><param name='scale' value='showall' /><param name='vmode' value='window' /><param name='devicefont' value='false' /><param name='bgcolor' value='#ffffff' /><param name='menu' value='true' /><param name='allowFullScreen' value='false' /><param name='allowScriptAccess' value='always' /><param name='salign' value='' /><param name=FlashVars VALUE='cid=" + cid + "&bid=" + bid + "&enc=" + enc + "&wv_remote_addr=" + wv_remote_addr + "&wv_useragent=" + wv_useragent + "&wv_referrer=" + wv_referrer + "&swf_width=" + swf_width + "&sc_speed=" + sc_speed+ "&loadPolicyFile=" + loadPolicyFile + "&jsonPath=" + jsonPath + "&newsLinkPath=" + newsLinkPath + "&urlRequestPath=" + urlRequestPath+ "' /><embed width=" + swf_width + " height=" + swf_height + " src='" + loadPolicyFile + swfNewsFile + "' quality='high' align='middle' pluginspage='http://www.macromedia.com/go/getflashplayer' play='true' loop='true' scale='true' wmode='transparent' devicefont='false' bgcolor='#ffffff' name='"+ swfNewsFile +"' menu='true' allowFullscreen='false' allowScriptAccess='always' salign='' FlashVars='cid=" + cid +"&bid=" + bid + "&enc=" + enc + "&wv_remote_addr=" + wv_remote_addr + "&wv_useragent=" + wv_useragent + "&wv_referrer=" + wv_referrer + "&swf_width=" + swf_width + "&sc_speed=" + sc_speed + "&loadPolicyFile=" + loadPolicyFile + "&jsonPath=" + jsonPath + "&newsLinkPath=" + newsLinkPath + "&urlRequestPath=" + urlRequestPath + "' allowScriptAccess='always' allowFullScreen='false' type='application/x-shockwave-flash' width=" + swf_width + " height=" + swf_height + "></embed></object />";

document.write(iHtml);

