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="";

var color1 = '#ffffff';
var color2 = '#e29658';

function MMon(p){
  // Blink, Blink, Blink...
 document.getElementById(p).style.backgroundColor  = color2;
}
function MMof(p){
 document.getElementById(p).style.backgroundColor  = color1;
}

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_el(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 ShowMenu(id) {
//hide_el();
//  level=id;
//alert (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 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 HideMore(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 ShowMore(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 ShowMore1(id) {
if (id == 'exhib'){
	 if (!document.exhib_form.edid.value || document.exhib_form.edid.value=='')
	 		show = false;
	 else
	    show = true;
}
if (id == 'purch'){
	 if (!document.purch_form.edid.value || document.purch_form.edid.value=='')
	 		show = false;
	 else
	    show = true;
}
if (show == true){	 
    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";
    }
}
else{
		alert('Please select Edition!');
}
}