﻿//Thùc hiÖn bëi Haso Design - haso@hcm.vnn.vn

function setPoint(what, topvalue, leftvalue){
	//document.all.Layer1.style.left = 0	
	eval("document.all."+what).style.top = topvalue
	eval("document.all."+what).style.left = leftvalue	
}
window.name='lno';
function mOvr(src) {
	if (!src.contains(event.fromElement)) {
	src.style.cursor = 'hand';
	src.background = '../images/b_left_o.jpg';
	}
}
function mOut(src) {
	if (!src.contains(event.toElement)) {
	src.style.cursor = 'default';
	src.background = '../images/b_left.jpg';
	}
}
function mOvr_1(src) {
	if (!src.contains(event.fromElement)) {
	src.style.cursor = 'hand';
	src.bgColor = '#AB9663';
	src.children.tags('A')[0].style.color = '#FFFFFF';
	}
}
function mOut_1(src) {
	if (!src.contains(event.toElement)) {
	src.style.cursor = 'default';
	src.bgColor = '#AB9663';
	src.children.tags('A')[0].style.color = "";
	}
}
function mClk(src) {
	if(event.srcElement.tagName=='TD'){
	src.children.tags('A')[0].click();
	}
}
function MM_preloadImages() { 
  var d=document; if(d.images)
{
 if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//------------------------------ Thay doi hinh ----------------------

var aImages= new Array("../images/home01.jpg","../images/home02.jpg","../images/home03.jpg","../images/home04.jpg")
var aSize = new Array (120,175), iDisplay =3000, oTimer = null, iCurrent = 0, sSource = ""

function doDisplay() {
	clearTimeout(oTimer)
	if (sSource!="") {
	if (document.images.slideShow.filters) {
	document.images.slideShow.filters[0].Stop()
	document.images.slideShow.filters[0].Apply()
	document.images.slideShow.filters.revealTrans.transition=23
	}
	document.images.slideShow.src = sSource
	if (document.images.slideShow.filters)
	document.images.slideShow.filters[0].Play()
	}
}
function doReadyImage() {
	sSource = this.src
	if (oTimer==null) doDisplay()
}
function doErrorDisplay() {
	clearTimeout(oTimer)
	doLoad()
}
function doLoad() {
	clearTimeout(oTimer)
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 
	sSource = ""
	iCurrent++
	if (iCurrent==15) iCurrent=0
	oTimer = setTimeout("oTimer=null;doDisplay()",iDisplay)
	img.src = "../images/d"+iCurrent+".gif"
}
function quickNextLoad() {
	clearTimeout(oTimer)
	oTimer=null
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 	
	img.src = "../images/d"+iCurrent+".gif"
}
function quickPrevLoad() {
	clearTimeout(oTimer)
	oTimer=null
	var img = new Image()
	img.onload = doReadyImage
	img.onerror = doErrorDisplay 
	iCurrent-=1
	if (iCurrent<0) iCurrent=14
	iCurrent-=1
	if (iCurrent<0) iCurrent=14
	img.src = "../images/d"+iCurrent+".gif"
}
//------------------------------ Hien ngay gio ----------------------
function tS(){
	x=new Date(); 
	x.setTime(x.getTime()); 
	return x; 
} 
function lZ(x){
	return (x>9)?x:'0'+x; 
} 
function tH(x){
	if(x==0){ x=12; } 
	return (x>12)?x-=12:x; 
} 
function y2(x){ 
x=(x<500)?x+1900:x; 
return String(x).substring(0,4) 
	} 
function dT(){
if(fr==0){ fr=1; 
document.write('<span id="tP">'+eval(oT)+'</span>'); 
} 
tP.innerText=eval(oT); setTimeout('dT()',1000); 
} 
function aP(x){
 return (x>11)?'PM':'AM'; 
} 
var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),fr=0,oT="' '+dN[tS().getDay()]+', '+mN[tS().getMonth()]+' '+tS().getDate()+' , '+y2(tS().getYear())+' '";
//----------------------------------------------------

function ZoomIn(image,name) {
 
 stats="toolbar=no,location=no,scrollbars=no,directories=no,status=no,menubar=no,width=430,height=410,top=100,left=100,resizable=yes";
 popUpWin = window.open('','popWin',stats);

 zhtm= '<HTML><HEAD><TITLE>Zoom In Images: ' + name+ '</TITLE>';
 zhtm += '</head>';
 zhtm += '<body>';
 zhtm += '<p align="center">';
if (name.length !=0 || name.length !=1) zhtm += '<FONT face=Arial color=#008080 size=4>'+ name+'</FONT><br><br>';
 zhtm += '<a href="javascript:window.close();" ><IMG SRC="../images/' + image + 'm.gif" border=0></a>';
 zhtm += '</P><P ALIGN="right"><font face="arial" color="#000000" size="1">© 2004 by <a href="mailto:webmaster@binhthuan.gov.vn?subject=Chao cac ban !">PSO Net</a></font></p>';
 zhtm += '</BODY></HTML>';
 window.popUpWin.document.write(zhtm);
 window.popUpWin.document.close();
}
//----------------------------------------------------
function ViewI(image,name,align) {
if (align== '') jalign='justify';
if (align== 'c') jalign='center';
if (align== 'l') jalign='left';
if (align== 'r') jalign='right';

 zhtm= '<table cellPadding="5" width="1" align="'+jalign+'"><tr><td align="middle">';
 zhtm += "<a href=\"javascript:ZoomIn('" + image + "','" + name + "')\">";
 zhtm += '<img src="../images/' + image + '.gif" border=0 alt="'+ name +'"></a></td></tr>';
 zhtm += '<tr><td align="middle"><a class=note>'+ name+'</a></td></tr></table>';
document.write(zhtm);
}


//----------------------------------------------------

//----------------------------------------------------
function ImageLoad(value)
{
TheDate = new Date();                     
Month = TheDate.getMonth();              
Day = TheDate.getDate();                 
Year = TheDate.getYear();
if (Year< 1000)
Year+=1900
Hour = TheDate.getHours();
Minute = TheDate.getMinutes();
Second = TheDate.getSeconds(); 
return 'tl'+value+Second%5;
}