﻿function DateVN()
{
    var dat, hour, min, sec, data1 , data2;
    var months = new Array(13);
      months[1]="1";
      months[2]="2";
      months[3]="3";
      months[4]="4";
      months[5]="5";
      months[6]="6";
      months[7]="7";
      months[8]="8";
      months[9]="9";
      months[10]="10";
      months[11]="11";
      months[12]="12";
      var time = new Date();
      var lmonth = months[time.getMonth() + 1];
      var date = time.getDate();
      var year = time.getYear();
      
      
      var curHour = time.getHours()
      var curMin = time.getMinutes()
      var curTime = 
         ((curHour < 10) ? "0" : "") + curHour + ":" 
         + ((curMin < 10) ? "0" : "") + curMin;
      
      if (year < 2000)
      year = year + 1900;
      today = new Date();
      thisDay = today.getDay() + 1;
      if(thisDay == 1) thisDay = "Chủ nhật ";
      if(thisDay == 2) thisDay = "Thứ hai";
      if(thisDay == 3) thisDay = "Thứ ba";
      if(thisDay == 4) thisDay = "Thứ tư";
      if(thisDay == 5) thisDay = "Thứ năm";
      if(thisDay == 6) thisDay = "Thứ sáu";
      if(thisDay == 7) thisDay = "Thứ bẩy";
      data1 =  thisDay + ", " + date + "/" + lmonth + "/" + year +" "+curTime+" GMT+7"  ;
      document.write(data1);
}

function DateEN()
{
    var dat, hour, min, sec, data1 , data2;
    var months = new Array(13);
      months[1]="1";
      months[2]="2";
      months[3]="3";
      months[4]="4";
      months[5]="5";
      months[6]="6";
      months[7]="7";
      months[8]="8";
      months[9]="9";
      months[10]="10";
      months[11]="11";
      months[12]="12";
      var time = new Date();
      var lmonth = months[time.getMonth() + 1];
      var date = time.getDate();
      var year = time.getYear();
      var curHour = time.getHours()
      var curMin = time.getMinutes()
      var curTime = 
         ((curHour < 10) ? "0" : "") + curHour + ":" 
         + ((curMin < 10) ? "0" : "") + curMin;
      if (year < 2000)
      year = year + 1900;
      today = new Date();
      thisDay = today.getDay() + 1;
      if(thisDay == 1) thisDay = "Sunday";
      if(thisDay == 2) thisDay = "Monday";
      if(thisDay == 3) thisDay = "Tuesday";
      if(thisDay == 4) thisDay = "Wednesday";
      if(thisDay == 5) thisDay = "Thursday";
      if(thisDay == 6) thisDay = "Friday";
      if(thisDay == 7) thisDay = "Saturday";
      data1 =  thisDay + ", " + date + "/" + lmonth + "/" + year+" "+curTime+" GMT+7"   ;
      document.write(data1);
}

function ItemMinimize(Name)
	{
		var MItem = document.getElementById('IDM_'.concat(Name));
		//var Image = document.getElementById('IDI_'.concat(Name));
		
		if (MItem.style.display!='')
		{
			//MItem.setAttribute('style','display:""');
			MItem.style.display='';
			//Image.src='Images/min.gif';
		}
		else
		{
			//MItem.setAttribute('style','display:none');
			MItem.style.display='none';
			//Image.src='Images/max.gif';
		}
	}
	
function OpenWindow(windowURL, width, height, target){
try{
	var windowConfig = 'toolbar=no, ';
    //Menu
	windowConfig += 'menubar=no, ';
    //Scrollbars
	windowConfig += 'scrollbars=yes, ';
    //Resizable
	windowConfig += 'resizable=no, ';
    //Address Bar
	windowConfig += 'location=no, ';
	//Favorites
	windowConfig += 'directories=no, ';
	//Statusbar
	windowConfig += 'status=no, ';
	if(width != null){
	windowConfig += 'width='+ width +', ';		
	}else{windowConfig += 'width=400, ';}
	
	if(target == null){
	target="towWin";}	

	if(height != null){
	windowConfig += 'height='+ height +', ';		
	}else{windowConfig += 'height=700, ';}		
	var leftWin = (window.screen.availWidth - width)/2
	var topWin = (window.screen.availHeight - height)/2
	windowConfig += 'left=' + leftWin + ', ';
	windowConfig += 'top='+ topWin + ', ';
	//windowConfig += 'height=' + window.screen.height + ', ';
	//windowConfig += 'width=' + window.screen.width;
	var newWindow = window.open(windowURL, target, config = windowConfig);
	newWindow.opener = window;
}catch(e){}
}
 function JoinU(index)
 {
		var div1 = window.document.getElementById("JoinU_" + index).className="div_hien";
		var div2 = window.document.getElementById("JoinD_" + index).className="div_hien";
 }
 
 function JoinD(index)
 {
		var div1 = window.document.getElementById("JoinU_" + index).className="div_hien";
		var div2 = window.document.getElementById("JoinD_" + index).className="div_an";
 }	