﻿function forgetpassword(theForm){
    theForm.txtuser.value = '' ;
    theForm.txtpass.value = '' ;
    theForm.submit();
}
function checklogin(theForm){
    if(theForm.txtuser.value=="") {
        alert("Vui lòng nhập mã hội viên") ;
        theForm.txtuser.focus();
        return false;
    }
    if(theForm.txtpass.value=="") {
        alert("Vui lòng nhập mật khâu") ;
        theForm.txtpass.focus();
        return false;
    }
    theForm.submit();
}
function OnNewMemberPic(){
    var pForm=window.document.frm; //Variable to hold form object
	if(pForm.new_title.value=="") {  
        alert("Nhập vào tên ảnh");
        pForm.new_title.focus();
        return false ;
    }
	//pForm.method="Get";
	pForm.action="upload.php?o=2";
    pForm.submit();
    return true ;
}
function OnVote(){
	var pForm=window.document.vote;
	
	s='';
	for( i=0; i<pForm.chkvote.length;i++)
		if(pForm.chkvote[i].checked)
			s=s+ pForm.chkvote[i].value+'|';
	if(s==''){ 
		alert("Vui lòng dánh dấu để bình chọn") ;
		return false;
	};
	pForm.action="vote_rate.php?catid="+s+"&qid="+pForm.qid.value+"&url="+pForm.url.value;

	pForm.submit();
    return true ;
}
function OnVoteResult(){
	var pForm=window.document.vote;
	pForm.action="poll.php?rs=1";
    pForm.submit();
    return true ;
}
var _video_index = 0;
function video(flv){
		_video_index++;
		document.write('<p id=bongda_video'+_video_index+' name=bongda_video'+_video_index+'></p>');
		var sFlashPlayer= new SWFObject("js/mediaplayer.swf","bongda_playlist"+_video_index,"450","340","0");
		sFlashPlayer.addParam("allowfullscreen","true");
		sFlashPlayer.addParam("wmode","transparent");
		sFlashPlayer.addVariable("file",flv);
		sFlashPlayer.addVariable("displayheight","340");
		sFlashPlayer.addVariable("width","450");
		sFlashPlayer.addVariable("height","340");
		sFlashPlayer.addVariable("backcolor","0xcc0000");
		sFlashPlayer.addVariable("frontcolor","0xCCCCCC");
		sFlashPlayer.addVariable("lightcolor","0x557722");
		sFlashPlayer.addVariable("shuffle","false");
		sFlashPlayer.addVariable("repeat","list");
		sFlashPlayer.write('bongda_video'+_video_index);
}