function flash(){
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
    objects[i].outerHTML = objects[i].outerHTML;
	}
}

var close_w;

function newwin(url,page,dir,img,theWidth, theHeight) {
 var index=page;
 var path=dir;
 if (close_w) {
         close_w.close();
        }
 new_window = open(url,"displayWindow","width="+theWidth+", height="+theHeight+", scrollbars=yes,resizable=yes,toolbar=no,menubar=no,left=0,top=0");
 close_w=new_window;
}

function fea_pop(url) {
 if (close_w) {
         close_w.close();
        }
 new_window = open(url,"displayWindow","width=724, height=498,scrollbars=no,resizable=no,toolbar=no,menubar=no,left=0,top=0");
 close_w=new_window;
}

function video_popup(lang,src) {
 wdparms = 'width=715,height=420,scrollbars=no,resizable=yes,toolbar=no,menubar=no,left=0,top=0';
 window.open( lang+'/video.php?file='+src,'',  wdparms );
}

var restoreimgsrc1="";

function MMon(p){
restoreimgsrc1 = document.images[p].src;
document.images[p].src=restoreimgsrc1.substring(0,restoreimgsrc1.length-4)+"_on.jpg";
}
function MMof(p){
 document.images[p].src=restoreimgsrc1;
}

var restoreimgsrc="";
var obj="";
var obj1="";

function CellChangeOn(l) {

if (document.getElementById(l)){
	obj = document.getElementById(l);
}
if (document.all) {
	obj = document.all[l];
}
if (document.layers) {
	obj = document.layers[l];
}
	restoreimgsrc = obj.style.backgroundImage;
//	alert (restoreimgsrc);
	obj.style.backgroundImage  = restoreimgsrc.substring(0,restoreimgsrc.length-5)+"_on.jpg)";
//	alert (restoreimgsrc+'  -  '+obj.style.backgroundImage+' -  '+restoreimgsrc.substring(0,restoreimgsrc.length-11)+s+"l_item_bg.gif)")
}

function CellChangeOff(l){

	obj.style.backgroundImage  = restoreimgsrc;
}

function hide_el1(id) { /// hide layers ///
    if (document.getElementById(id)){
			el1 = document.getElementById(id);
		}
		if (document.all) {
			el1 = document.all[id];
		}
		if (document.layers) {
			el1 = document.layers[id];
		}
		el1.innerHTML = el1.innerHTML;
		
		if (document.getElementById(id)){
			document.getElementById(id).style.visibility= "hidden";
		}
		if (document.all) {
			document.all[id].style.visibility = "hidden";
		}
		if (document.layers) {
			document.layers[id].visibility = "hide";
		}
}

function ShowMenu1(id) {
//hide_el();
//  level=id;
//alert (id);
if (document.getElementById(id)){
  document.getElementById(id).style.overflow = "auto";
	document.getElementById(id).style.visibility= "visible";
}
if (document.all) {
	document.all[id].style.overflow = "auto";
	document.all[id].style.visibility = "visible";
}
if (document.layers) {
	document.layers[id].overflow = "auto";
	document.layers[id].visibility = "show";
}
}

function ShowMenu2(id) {
//hide_el();
//  level=id;
if (document.getElementById(id)){
	document.getElementById(id).style.visibility= "visible";
}
if (document.all) {
	document.all[id].style.visibility = "visible";
}
if (document.layers) {
	document.layers[id].visibility = "show";
}
}

function hide_el2(id) { /// hide layers ///
	
		if (document.getElementById(id)){
			document.getElementById(id).style.visibility= "hidden";
		}
		if (document.all) {
			document.all[id].style.visibility = "hidden";
		}
		if (document.layers) {
			document.layers[id].visibility = "hide";
		}
}

function popupWindow(src,width,height,scrollbars,toolbar,resizable, menubar,title,autosize) {
	 	wdparms = 'width='+width+',height='+height+',scrollbars='+scrollbars+',toolbar='+toolbar+',resizable='+resizable+',menubar='+menubar;
		window.open( '/popupWindow.php?src='+src+'&autosize='+autosize+'&title='+title, '',  wdparms );
}

function chview(id,chv) {

if (chv=='minus'){
	 ch = "";
	 chtd = '<a href="#" onclick="chview(\''+id+'\',\'plus\');">-</a>';
}
if (chv=='plus'){
	 ch = "none";
	 chtd = '<a href="#" onclick="chview(\''+id+'\',\'minus\');">+</a>';
}

if (document.getElementById('pm'+id)){
  document.getElementById('pm'+id).innerHTML = chtd;
	document.getElementById('tb'+id).style.display= ch;
}
if (document.all) {
	document.all['pm'+id].style.innerHTML = chtd;
	document.all['tb'+id].style.display = ch;
}
if (document.layers) {
	document.layers['pm'+id].innerHTML = chtd;
	document.layers['tb'+id].display = ch;
}
}