
// Live Broadcasting Popup
function media_live_Open_en(mArg,mPlayType,mServer)
{	
	var mediaVOD_player = window.open("/EN/Media/Viewer/LiveFile.asp?live="+mArg+'&playtype='+mPlayType+'&mServer='+mServer,'fms','left=0,top=0,width=400,height=300,status=no,scrollbars=no,resizable=no');
	mediaVOD_player.focus();
}

// mp3 popup
function openwin_mp3(theURL) {
    window.open(theURL,"mp3",'left=50,top=50,width=965,height=695,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}


function print()
{
	//alert( document.getElementById("viewBody").innerHTML);
	try{
	
	var newWin = window.open("../Common/print.htm", "", "width=820,height=600,scrollbars=yes,resizable=yes");
	
	}catch(e){alert(' Print Failed' );}
	
}


//function gallery_open(tempFlag) {
//    window.open('../gallery/gallery.asp?tempFlag='+tempFlag,'gallery','width=820,height=780,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
//}

function gallery_open(tempFlag) {
    var photo_gallery = window.open('/EN/Gallery/gallery.asp?'+tempFlag,'gallery','width=1024,height=740,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
    photo_gallery.focus();
}

function PhotoViewer(P_NUM, P_URL)
{
	
	var PH_Win = window.open("", "photo"+P_NUM, "width=1024,height=768,status=yes,resizable=yes,left=0,top=0") ;
	
	var tmHTML = "<img id=PHOTO src='"+P_URL+"'>";
	PH_Win.document.write ("<html><body leftmargin='5' topmargin='0'><a href='#' onclick='self.close();'>"+ tmHTML +"</a></body></html>");	
	
	PH_Win.resizeTo(PH_Win.PHOTO.width, PH_Win.PHOTO.height);
	PH_Win.moveTo(0,0);
	PH_Win.focus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function onscroll_1() {

     rb_banner.style.top = document.body.scrollTop + 130;
     rb_banner.style.visibility = "visible";
     CheckUIElements();
     
//   y = document.body.scrollTop + 100
//   rb_banner.style.pixelTop = y;
}

function ImageViewer(P_SIZE, P_URL)
{

	if (P_SIZE == '1024')
		pSize = "width=1024,height=768,status=no,resizables=yes";
	else
		pSize = "width=1280,height=1024,status=no,resizables=yes";
		
	var IMG_WIN = window.open("", "photo"+P_SIZE, pSize) ;
	var tmHTML = "<img id=PHOTO src='"+P_URL+"' onClick='window.close();' style='cursor:hand;'>";

	IMG_WIN.moveTo(0,0);
	IMG_WIN.document.write ("<html><title>MANMIN TV</title><body leftmargin='0' topmargin='0'>"+ tmHTML +"</body></html>");		
	IMG_WIN.focus();

}

var open_flag = 0;
function open_menu() {
	if (open_flag == 0) {
	    document.all('s_menu1').style.visibility = 'visible';
	    open_flag = 1;
	} else {
	    document.all('s_menu1').style.visibility = 'hidden';
	    open_flag = 0;
	}
	
}

var open_flag2 = 0;
function open_menu2() {
	if (open_flag2 == 0) {
	    document.all('s_menu4').style.visibility = 'visible';
	    open_flag2 = 1;
	} else {
	    document.all('s_menu4').style.visibility = 'hidden';
	    open_flag2 = 0;
	}
	
}

function ebook_open(tempFile,nWidth,Nheight) {
    var ebook = window.open('/EN/Ebook/brochure/'+tempFile,'ebook','width='+nWidth+',height='+Nheight+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,left=0,top=0');
    ebook.focus();
}


