<!--
function FP_openNewWindow(w,h,nav,loc,sts,menu,scroll,resize,name,url) {//v1.0
 var windowProperties=''; if(nav==false) windowProperties+='toolbar=no,'; else
  windowProperties+='toolbar=yes,'; if(loc==false) windowProperties+='location=no,'; 
 else windowProperties+='location=yes,'; if(sts==false) windowProperties+='status=no,';
 else windowProperties+='status=yes,'; if(menu==false) windowProperties+='menubar=no,';
 else windowProperties+='menubar=yes,'; if(scroll==false) windowProperties+='scrollbars=no,';
 else windowProperties+='scrollbars=yes,'; if(resize==false) windowProperties+='resizable=no,';
 else windowProperties+='resizable=yes,'; if(w!="") windowProperties+='width='+w+',';
 if(h!="") windowProperties+='height='+h; if(windowProperties!="") { 
  if( windowProperties.charAt(windowProperties.length-1)==',') 
   windowProperties=windowProperties.substring(0,windowProperties.length-1); } 
 window.open(url,name,windowProperties);
}

function OpWin(UrlStr){
FP_openNewWindow('', '', false, false, false, false, true, true, 'Flash', /*href*/''+UrlStr)
}

function checkRate(str)
{
     var re = /^[1-9]+[0-9]*]*$/;   //判断字符串是否为数字/^[0-9]+.?[0-9]*$/     //判断正整数 /^[1-9]+[0-9]*]*$/   
     if (!re.test(str)) {
        return false;
    } else {
		return true;
	}
}

var Cookie= {
        Set : function (){
                var name = arguments[0], value = escape(arguments[1]),
                days = (arguments.length > 2)?arguments[2]:365,
                path = (arguments.length > 3)?arguments[3]:"/";
                with(new Date()){
                        setDate(getDate()+days);
                        days=toUTCString();
                }
                document.cookie = "{0}={1};expires={2};path={3}".format(name, value, days, path);
        },
        Get : function (){
                var returnValue=document.cookie.match(new RegExp("[\b\^;]?" + arguments[0] + "=([^;]*)(?=;|\b|$)","i"));
                return returnValue?unescape(returnValue[1]):returnValue;
        },
        Delete : function (){
                var name=arguments[0];
                document.cookie = name + "=1 ; expires=Fri, 31 Dec 1900 23:59:59 GMT;";
        }
}

//JS等比缩略图
function DrawImage(ImgD,iw,ih){
    var image=new Image();
    var iwidth = iw; //定义允许宽度，当宽度大于这个值时等比例缩小
    var iheight = ih; //定义允许高度，当高度大于这个值时等比例缩小
    image.src=ImgD.src;
    if(image.width>0 && image.height>0){
        flag=true;
        if(image.width/image.height>= iwidth/iheight){
            if(image.width>iwidth){
                ImgD.width=iwidth;
                ImgD.height=(image.height*iwidth)/image.width;
            }else{
                ImgD.width=image.width;
                ImgD.height=image.height;
            }
        }else{
            if(image.height>iheight){
                ImgD.height=iheight;
                ImgD.width=(image.width*iheight)/image.height;
            }else{
                ImgD.width=image.width;
                ImgD.height=image.height;
            }
        }
    }
}

function request(paras){ 
var url = location.href;   
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");   
var paraObj = {}   
for (i=0; j=paraString[i]; i++){   
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf 
("=")+1,j.length);   
}   
var returnValue = paraObj[paras.toLowerCase()];   
if(typeof(returnValue)=="undefined"){   
return "";   
}else{   
return returnValue;   
}   
} 
var theurl 
theurl=request("url"); 
if (theurl!=''){ 
location=theurl 
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    } else {
        return document[movieName]
    }
}

function getCurrentUrlJstoFla() {
jQuery(document).ready(function() {
//alert(window.location.href.replace('\&','^'));
//alert(location.search.substr(1));
thisMovie('Top_menu').SetVariable("Lang.currentUrl", window.location.href.replace('\&','^'));
});
}
var reg = /^\-?([1-9]\d*|0)?$/;
var current=request("current");
var tv_width=505;//350
var tv_height=365;//275
var tvtexts='@KERUI';
var movies='public/media/vcastr.swf';
var intostr="";
if(reg.test(current)) {
if(current.length>0) {
var tvfiles='http://' + window.location.host + '/UploadFile/'+current+'.flv';
intostr='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ tv_width +'" height="'+ tv_height +'">';
intostr+='<param name="movie" value="'+movies+'" /><param name="quality" value="high" />';
intostr+='<param name="menu" value="false" /><param name=wmode value="opaque" />';
intostr+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" />';
intostr+='<param name="FlashVars" value="vcastr_file='+tvfiles+'&vcastr_title='+tvtexts+'" />';
intostr+='<embed src="'+movies+'" wmode="opaque" FlashVars="vcastr_file='+tvfiles+'&vcastr_title='+tvtexts+'& menu="false" quality="high" width="'+ tv_width +'" height="'+ tv_height +'" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
intostr+='</object>';
} else {
intostr='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ tv_width +'" height="'+ tv_height +'">';
intostr+='<param name="movie" value="'+movies+'" /><param name="quality" value="high" />';
intostr+='<param name="menu" value="false" /><param name=wmode value="opaque" />';
intostr+='<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" />';
intostr+='<param name="FlashVars" value="vcastr_title='+tvtexts+'" />';
intostr+='<embed src="'+movies+'" wmode="opaque" FlashVars="vcastr_title='+tvtexts+'& menu="false" quality="high" width="'+ tv_width +'" height="'+ tv_height +'" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
intostr+='</object>';
}
jQuery(document).ready(function() {
if($("#VOD") != null){$("#VOD_id").html(intostr);}
});
}
// -->