<!--

function onColor(bgcolor) {
/*
color1=Math.round(Math.random()*256)
color2=Math.round(Math.random()*256)
color3=Math.round(Math.random()*256)

if (color1+color2+color3 < 256) {
if (color1 < 128) {color1 = color1 +128}
if (color2 < 128) {color2 = color2 +128}
if (color3 < 128) {color3 = color3 +128}
}

color1=color1.toString(16)
color2=color2.toString(16)
color3=color3.toString(16)

bgcolor.style.backgroundColor="#"+color1+color2+color3
*/
bgcolor.style.backgroundColor="#FF0000"


}


function offColor(bgcolor) {
bgcolor.style.backgroundColor="#000000"
}


function popup(fname,thumbwidth,thumbheight) {
margin=30
ratio = thumbwidth / thumbheight

if (thumbwidth >= thumbheight) {
	pwidth  = 600
	pheight = Math.round(pwidth / ratio)
	}else{
	pheight = 450
	pwidth  = Math.round(pheight * ratio)
	}

//alert(pwidth)
//alert(pheight)
popupwidth  = pwidth+margin
popupheight = pheight+margin+20

width=(screen.availWidth-popupwidth)/2
height=(screen.availHeight-popupheight)/2

fname=fname+""
fno=fname.lastIndexOf("/")
newfilename=fname.substr(fno+1)
newfilename=newfilename.substr(2)
newpath=fname.substr(0,fno+1)+""+newfilename
popup1=window.open("","popup2","width="+popupwidth+",height="+popupheight+",top="+height+",left="+width)
popup1.document.open()
timer1=setTimeout("writedata()",1000)
}


function writedata() {
popup1.document.write("<html><title>HKVA</title><body onblur='window.close()' onclick='window.close()'><center><img src='"+newpath+"' border='1' name='photo' id='photo' width='"+pwidth+"' height='"+pheight+"'></center></body></html>")
popup1.document.close()
popup1.window.focus()
clearTimeout(timer1)
}


function popupvideo(fname) {
width=(screen.availWidth-352)/2
height=(screen.availHeight-333)/2

popupvideo1=window.open(fname,"popupvideo2","width=352,height=333,top="+height+",left="+width)
popupvideo1.window.focus()
//popup1.document.open()
//timer1=setTimeout("writedata()",1000)
}

-->