﻿function clickChooseFile(values,controlget)
{			
		this.parent.opener.document.getElementById(controlget).value =  values;
		this.parent.close();
}
function popUpCenteredWindow(src) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(src,null,"status=yes,height=480px,width=776px,resizable=yes,left=15,top=15,scrollbars=auto");
	win2.focus();
}
function popUpCenteredWindow_wh(src,h,w) {
	var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (122 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (27 + 50); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(src,null,"status=no,height=h,width=w,resizable=yes,left=15,top=15,scrollbars=yes");
	win2.focus();
}
function callnewwin(mylocal){ //v3.0
  if(mylocal != null) window.open(mylocal,null,"");
}
function openlink(src)
{	
	var win2 = window.open(src,null,"status=yes,height=400,width=600,resizable=no,left=15,top=15,scrollbars=auto");
	win2.focus();
}
function  Textprompt(tieude)
{	
	var kqtext = prompt(tieude,"name");
	Textprompt('ss')=kqtext;
	return Textprompt('ss');
}
/*function mess(mess,controlget)
{	
	var values;
	values = confirm(mess);
	alert(values);
	this.parent.opener.document.getElementById(controlget).value =  values;
	//this.parent.close();

}
function ThoiGian()
{
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
weekday= myweekday;
myyear= mydate.getYear();
year = myyear;
myhours = mydate.getHours();
ampmhour  =  (myhours > 12) ? myhours - 12 : myhours;
ampm =  (myhours >= 12) ? ' PM' : ' AM';
mytime = mydate.getMinutes();
myminutes =  ((mytime < 10) ? ':0' : ':') + mytime;
if(myday == 0)
day = " Sunday, ";
else if(myday == 1)
day = " Monday, ";
else if(myday == 2)
day = " Tuesday, ";
else if(myday == 3)
day = " Wednesday, ";
else if(myday == 4)
day = " Thurday, ";
else if(myday == 5)
day = " Friday, ";
else if(myday == 6)
day = " Saturday, ";
if(mymonth == 0) {
month = "January ";}
else if(mymonth ==1)
month = "February ";
else if(mymonth ==2)
month = "March ";
else if(mymonth ==3)
month = "April ";
else if(mymonth ==4)
month = "May ";
else if(mymonth ==5)
month = "June ";
else if(mymonth ==6)
month = "July ";
else if(mymonth ==7)
month = "August ";
else if(mymonth ==8)
month = "September ";
else if(mymonth ==9)
month = "October ";
else if(mymonth ==10)
month = "November ";
else if(mymonth ==11)
month = "December ";
document.write("<b><font color=#003333 face='Tahoma'>" + ampmhour + "" + myminutes + ampm)
document.write(" | " + day + month);
document.write(myweekday + "," + year + "</font>");
// End -->

}
function ThoiGianVietNam()
{
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate = new Date();
myday = mydate.getDay();
mymonth = mydate.getMonth();
myweekday= mydate.getDate();
weekday= myweekday;
myyear= mydate.getYear();
year = myyear;
myhours = mydate.getHours();
ampmhour  =  (myhours > 12) ? myhours - 12 : myhours;
ampm =  (myhours >= 12) ? ' Chiều' : ' Sáng';
mytime = mydate.getMinutes();
myminutes =  ((mytime < 10) ? ':0' : ':') + mytime;
if(myday == 0)
day = " Chủ nhật, ";
else if(myday == 1)
day = " Thứ 2, ";
else if(myday == 2)
day = " Thứ 3, ";
else if(myday == 3)
day = " Thứ 4, ";
else if(myday == 4)
day = " Thứ 5, ";
else if(myday == 5)
day = " Thứ 6, ";
else if(myday == 6)
day = " Thứ 7, ";
if(mymonth == 0) {
month = " 1 ";}
else if(mymonth ==1)
month = " 2 ";
else if(mymonth ==2)
month = " 3 ";
else if(mymonth ==3)
month = " 4 ";
else if(mymonth ==4)
month = " 5 ";
else if(mymonth ==5)
month = " 6 ";
else if(mymonth ==6)
month = " 7 ";
else if(mymonth ==7)
month = " 8 ";
else if(mymonth ==8)
month = " 9 ";
else if(mymonth ==9)
month = " 10 ";
else if(mymonth ==10)
month = " 11 ";
else if(mymonth ==11)
month = " 12 ";
document.write("<b><font color=#003333 face='Tahoma'>" + ampmhour + "" + myminutes + ampm)
document.write(" | " + day + myweekday );
document.write(" / " +  month+ "/" + year + "</font>");
// End -->

}*/