function iframeAutoFit(){
  var p = parent.document.getElementsByTagName("IFRAME");
  for(i=0;i<p.length;i++){
    p[i].style.height = document.documentElement.scrollHeight+ 'px';
  }
}
function play(urlid){	//点播地址生成
 	var url = window.location.href;
 	var re = /frameurl(.*)/ig
 	var jumpurl = url.replace(re, 'play/urlid/'+urlid+'/');
	var server = $("input[@name=server][@checked]").val();
	var player = $("input[@name=player][@checked]").val();
	if (typeof(server) != 'undefined'){
		jumpurl = jumpurl+'server/'+server+'/'
	}
	if (typeof(player) != 'undefined'){
		jumpurl = jumpurl +'player/'+player+'/';
	}
 	var paramet = 'toolbar=no,width=500,height=500,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"vodcms",paramet);
	newWindow.focus();
}
function down(urlid){	//点播地址生成
 	var url = window.location.href;
 	var re = /downurl(.*)/ig
 	var jumpurl = url.replace(re, 'down/urlid/'+urlid+'/');
 	var paramet = 'toolbar=no,width=500,height=500,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"vodcms",paramet);
	newWindow.focus();
}
function feedback(movid){
	var url = window.location.href;
	var re = /content(.*)/ig
	var jumpurl = url.replace(re, 'feedback/report/movid/'+movid+'/');
	var paramet = 'toolbar=no,width=410,height=326,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"feedback",paramet);
	newWindow.focus();
}
function register(basedir){
	var jumpurl = basedir+'member/register/';
	var paramet = 'toolbar=no,width=530,height=500,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"register",paramet);
	newWindow.focus();
}
function comment(movid){
	var url = window.location.href;
	var re = /content(.*)/ig
	var jumpurl = url.replace(re, 'content/comment/movid/'+movid+'/');
	var paramet = 'toolbar=no,width=530,height=500,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"comments",paramet);
	newWindow.focus();
}
function vote(base, id){
	var jumpurl = base + 'content/vote/id/'+id;
	var paramet = 'toolbar=no,width=400,height=460,location=no,status=no,scrollbars=no,menubar=no,resizable=yes';
	newWindow =parent.window.open(jumpurl,"vote",paramet);
	newWindow.focus();
}
function orderby(by){
	var url = window.location.href;
	var re = /orderby\/(.*)/ig
	var jumpurl = url.replace(re, '')+'orderby/'+by+'/';
	top.window.location.href = jumpurl;
}