function EPG_Toggle(id){
	if (document.all){
		if(document.all[id].style.display == 'none'){
		document.all[id].style.display = '';
		}else{
		document.all[id].style.display = 'none';
		}
		return false;
	}else if (document.getElementById){
		if(document.getElementById(id).style.display == 'none'){
		document.getElementById(id).style.display = 'block';
		}else{
		document.getElementById(id).style.display = 'none';
		}
		return false;
	}
}

function EPG_Close(id){
	if (document.all){
		if (document.all[id].style.display == '') {
			document.all[id].style.display = 'none';
		}
	}else if (document.getElementById){
		if (document.getElementById(id).style.display == 'block'){
			document.getElementById(id).style.display = 'none';
		}
		if (document.getElementById(id).style.display == ''){
		document.getElementById(id).style.display = 'none';
		}
	}
}

function EPG_Open(id) {
	if (document.all){
		if (document.all[id].style.display == 'none') {
			document.all[id].style.display = '';
		}
	} else if (document.getElementById) {
		if (document.getElementById(id).style.display == 'none') {
			document.getElementById(id).style.display = 'block';
		}
	}
}

function EPG_OpenAll(media){
var counter;
if (media == 'TV'){
counter = 6
}else{
counter = 4
}
var arrmenu = Array(6);
arrmenu[0] = "Danish";
arrmenu[1] = "Local";
arrmenu[2] = "SvNo";
arrmenu[3] = "German";
arrmenu[4] = "EngAmr";
arrmenu[5] = "French";
  
var divId;
for (i=0; i<counter; i++) {
divId = media + arrmenu[i];
EPG_Open(divId);
}
}

function EPG_ImageToggle(daImage, src1, src2){
//Check to make sure that images are supported in the DOM.
myImage = document.images[daImage];
if(document.images){
// Check to see whether you are using a name, number, or object
if(myImage.src == src1){
myImage.src = src2;
}else {
myImage.src = src1;
}
}
}

function EPG_ImageChange(daImage, src, netscape_container){
// Check to make sure that images are supported in the DOM.
myImage = document.images[daImage];
if(document.images){
myImage.src = src;
}
}
