$("#fla_banner").embedSWF({src:"swf/index_banner.swf",width:"980",height:"300",flashvars:{xmlfile:"xml.aspx?cmd=index_banner"}});
$("#fla_shortcut").embedSWF({src:"swf/index_banner_slide.swf",width:"978",height:"145",flashvars:{xmlfile:"xml.aspx?cmd=shortcut&id=7&_="+ Math.random()}});
$("#fla-link").embedSWF({src:"swf/index_btn.swf",width:"940",height:"110"});
$(".focus").doFocusInput();
	var bannerStatus = 0;
	var banner = document.getElementById("banner");
	var bannerOver = function(){bannerStatus = 1;}
	 
	$(document).bind("mouseover",function(ev){
		if(bannerStatus === 1){
			$("object", banner)[0].SetVariable("status",'0');
			bannerStatus = 0;
		}
	});
	
	
	/* @ Broadcast Popup */
		var closeBroadcast = function(){$.cookie( broadcastName , '1' , { expires: $("#remem")[0].checked? 60:1 });};
		var broadCastPopup = function(img , w , h){
			var nyroCloseBtn = '<a href="#" style="float:right;margin:2px 0" class="nyroModalClose"  title="close"><img src="images/btn/btn-close.png" alt="close" title="close" /></a>';
			var content_h=h+25;
			$.nyroModalManual({
				modal: true,
				type:"content",
				resizable: false, // Indicate if the content is resizable. Will be set to false for swf
				autoSizable: false,
				content:'<div style="width:'+w+'px;height:'+content_h+'px;overflow:hidden;"><img width="'+w+'" height="'+h+'" style="display:block;" src="stocks/media/' + img + '" />'+ nyroCloseBtn +'<p style="padding-top:6px;"><input type="checkbox" id="remem" name="remem" value="1" /> <label for="remem">Don\'t show me again.</label><div class="clearfix"></div></p></div>',
				//content:'<div style="background:white;border:1px solid gray;"><img src="stocks/media/' + img + '" /><p>'+ nyroCloseBtn +'<label style="display:block;float:right;padding-top:4px;"><input type="checkbox" id="remem" name="remem" value="1" style="display:block;float:left;margin-top:3px" /><span style="display:block;float:left;margin-top:1px">Don\'t show me again. </span></label><div class="clearfix"></div></p></div>',
				closeButton:"",
				//autoWidth:true,
				//autoHeight:true,
				width:w,
				height:content_h,
				beforeHideContent:function(elts, settings, callback ){
					//$.cookie( broadcastName , '1' , { expires: $("#remem")[0].checked? 60:1 });
					closeBroadcast()
					callback();
				} ,
				hideContent: function(elts, settings, callback){
					elts.contentWrapper
						.animate({ opacity: 0 }, {complete: callback, duration: 350});
				}
				 
				
			});
		};
