var boolNS4 = navigator.appVersion.indexOf("Nav") > 0 && parseInt(navigator.appVersion) == 4;
var number_of_images=4
//change speed below (in seconds)
var speed=3
var step=1
var whichimage=1

function slideit(){
if (!document.images)
return
if (document.all)
	slide.filters.blendTrans.apply()
	document.images.slide.src=eval("image"+step+".src")
if (document.all)
	slide.filters.blendTrans.play()
	whichimage=step
if (step<number_of_images)
	step++
else
	step=1
if (document.all)
	setTimeout("slideit()",speed*1000+3000)
else
	setTimeout("slideit()",speed*1000)
}
function mailnospam(user, site, cssclass) {
   document.write('<a href=\"mailto:' + user + '@' + site + '\">');
   document.write(user + '@' + site + '</a>');
}
function mailnamenospam(user, site, name, cssclass) {
   document.write('<a href=\"mailto:' + user + '@' + site + '\">');
   document.write(name + '</a>');
}
function addrnospam(user, site) {
   document.write(user + '@' + site);
}
function opennew1() {
	w = window.open('poomse.asp?Title=Taeguek%20Il%20Jang&amp;PoomseFile=video1-1.mpg&amp;Lng=DK', 'winupload', 'width=230, height=256')
}
function opennew2() {
	w = window.open('poomsemain.asp?Title=Taeguek%20Il%20Jang&amp;PoomseFile=video1-1.mpg&amp;Lng=DK', 'poomse', 'width=490, height=342')
}
function toggleDesc(strProgramID)
{
   if(boolNS4) return false;

 //  objCurrentShort = GetElement("Desc"+strProgramID+"Short");
 //  objCurrentShort.style.display = (objCurrentShort.style.display=="none" ? "block" : "none");

   objCurrentLong = GetElement("Desc"+strProgramID+"Long");
   objCurrentLong.style.display = (objCurrentLong.style.display=="none" ? "block" : "none");

}

function OpenWindow(strURL, strTitle, intWidth, intHeight, boolScrollbar)
{
	var intMyLeft = eval(screen.width-intWidth)/2;
	var intMyTop  = eval(screen.height-intHeight)/2;
	window.open(strURL,strTitle,'toolbar=no,location=no,status=no,menubar=no,scrollbars='+(boolScrollbar ? 'yes' : 'no')+',resizable=no,width='+intWidth+',height='+intHeight+',left='+intMyLeft+',top='+intMyTop);
}
function OpenDialog(strFile, strTagplace, intWidth, intHeight)
{
	window.showModalDialog( strFile, strTagplace,'dialogHeight: '+intHeight+'; dialogWidth: '+intWidth+'px;  dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: Yes; status: No;');
}
function SetStatusMsg($strText)
{
   window.status = $strText;
}

function ClearStatusMsg()
{
   window.status = "";
}

function GetElement(strElement)
{
	if (document.getElementById)
	{
		// IE5+, Netscape 6, Mozilla
		return (document.getElementById(strElement));
	}
	else if (document.all)
	{
		// IE4
		return (eval("document.all." + strElement));
	}
	else if (document.layers)
	{
		// Netscape 4
		return (eval("document." + strElement));
	}
	else
	{
		// Nothing
		return (null);
	}
}

function GetFormElement(strForm, strElement)
{
   // If strElement is empty, then get the form.
	if (strElement != "") {
		strElement = "." + strElement;
	}
	return (eval("document.forms['" + strForm + "']" + strElement));
}

function GetParentElement(strElement)
{
	if (document.getElementById)
	{
		// IE5+, Netscape 6, Mozilla
		return (parent.document.getElementById(strElement));
	}
	else if (document.all)
	{
		// IE4
		return (eval("parent.document.all."+strElement));
	}
	else if (boolNS4)
	{
		// Netscape 4
		return (eval("document."+strElement));
	}
	else
	{
		// Nothing
		return (null);
	}
}
function mouseovermenutr (o){
	// o.style.backgroundColor= "#70a0cF";
	o.style.cursor="hand";	
}
function mouseoutmenutr(o){
	//o.style.backgroundColor="#000000";
}
function mouseovermenutd (o){
	// o.style.borderStyle="solid";
	// o.style.borderColor="#ffffff";
	//o.style.backgroundColor= "#4a4a4a";
	//o.style.color="#ffffff";
}
function mouseoutmenutd (o){
	//o.style.color="#ffffff";
	//o.style.borderColor="#31659C";
	//o.style.backgroundColor="black";
	//o.style.backgroundColor="transparent";
	//o.style.backgroundImage="url(../images/MenuBlackBackground.gif)";
	//o.style.backgroundRepeat="repeat-x";
}
function mouseovertr (o){
	// o.style.backgroundColor= "#70a0cF";
	o.style.cursor="hand";	
}
function mouseouttr(o){
	//o.style.backgroundColor="#CBDEF3";
}
function mouseovertd (o){
	//o.style.backgroundColor= "#CBDEF3";
	//o.style.borderWidth= "1px";
	//o.style.borderStyle= "solid";
	//o.style.borderColor= "#909090";
}
function mouseouttd (o){
	//o.style.color="#ffffff";
	//o.style.backgroundColor="#ffffff";
	//o.style.borderWidth= "1px";
	//o.style.borderStyle= "solid";
	//o.style.borderColor= "white";
	//o.style.filter = "progid:DXImageTransform.Microsoft.gradient(GradientType=1,endColorstr=#D8D8D8, startColorstr=#D8D8D8);";
}
function hoverTitle (o) {
//	o.class = 
}
function mouseoverMenu(sProgramID,sColor)
{
   if(boolNS4) return false;
   
	objCurrentTop = GetElement("Top"+sProgramID);
	objCurrentTop.style.color = sColor;
}
function mouseoutMenu(sProgramID,sColor)
{
   if(boolNS4) return false;
   
	objCurrentTop = GetElement("Top"+sProgramID);
	objCurrentTop.style.color = sColor;
}
function toggle(el)
{
	myEl = document.getElementById(el);
	myEl.style.display = (myEl.style.display == 'none') ? 'block' : 'none';
}
function showhide(div){
    oDiv = document.getElementById(div);
    if(oDiv.style.display == "none"){
        oDiv.style.display = "block";
    }else{
        oDiv.style.display = "none";
    }
}
function email(n,d) 
{
   document.write("<a href=\"mailto");
   document.write(":" + n+ "@");
   document.write(d + "\">" + n+ "@" + d+ "<\/a>");
}
function openFull(el){
	el.nextSibling.style.display=='none'?el.nextSibling.style.display='block':el.nextSibling.style.display='none'
	el.nextSibling.style.display=='none'?el.style.backgroundImage='url(frwimages/Expandnone.gif)':el.style.backgroundImage='url(frwimages/Expand.gif)'
}
function openTitel(el){
	el.nextSibling.style.display=='none'?el.nextSibling.style.display='block':el.nextSibling.style.display='none'
	el.nextSibling.style.display=='none'?el.style.backgroundImage='url(frwimages/Expandnone.gif)':el.style.backgroundImage='url(frwimages/Expand.gif)'
}

function expandAll(fl){
	var elAr = document.getElementsByTagName("DIV");
	for(var i=2;i<elAr.length;i++){
		if(elAr[i].className=='block'){
			if(fl)
				elAr[i].style.display = "";
			else
				elAr[i].style.display = "none";
		}
	}
}
