
function openWindow(purl,pwname,pparam){
	ow = window.open(purl,pwname,pparam);
	ow.focus();
}

function openExhibitions(){

	exhw = window.open("exhibitions/ISL/","exhibitions","");

	var wmax = 1600;
	var hmax = 1200;
	exhw.moveTo(0,0);
	if(screen.availWidth>wmax){
			w = wmax;
		} else {
			w = screen.availWidth;
		}
		if(screen.availHeight>hmax){
			h = hmax;
		} else {
			h = screen.availHeight;
	}

	if (document.getElementById || document.all){
			exhw.resizeTo(w,h);
	}
	else if (document.layers){
			if (exhw.outerHeight<screen.availHeight || exhw.outerWidth<screen.availWidth)
		{
			exhw.outerHeight = h;
			exhw.outerWidth = w;
		}
	}
	exhw.focus();

}
function openArtIndroduction(){

	exhw = window.open("gai/ISL/","exhibitions","");

	var wmax = 1600;
	var hmax = 1200;
	exhw.moveTo(0,0);

	if(screen.availWidth>wmax){
			w = wmax;
		} else {
			w = screen.availWidth;
		}
		if(screen.availHeight>hmax){
			h = hmax;
		} else {
			h = screen.availHeight;
	}

	if (document.getElementById || document.all){
			exhw.resizeTo(w,h);
	}
	else if (document.layers){
			if (exhw.outerHeight<screen.availHeight || exhw.outerWidth<screen.availWidth)
		{
			exhw.outerHeight = h;
			exhw.outerWidth = w;
		}
	}

	exhw.focus();

}
 function popWindow(wName){
features = 'width=450,height=300,toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes';
pop = window.open('',wName,features);
if(pop.focus){ pop.focus(); }
return true;
}

function showGlossary(term,lng){
	//alert(term);
	/*var glossaryWindow = window.open('glossary.php?term='+term+'&lng='+lng,'glossary','width=500, height=300, toolbar=0, resizable=1, directories=0, menubar=0, status=1, location=0, scrollbars=1 ');
	glossaryWindow.focus();*/
	document.glossary.term.value=term;
	document.glossary.lng.value=lng;
	popWindow(document.glossary.target);
	document.glossary.submit();
}

function ChangeImage( iname, isrc ){
	document.images[iname].src = isrc;
}

function ChangeStyle( id, prop, stat ) {
	identity=document.getElementById(id);
	identity.style[prop]=stat;
}

function PageListRefresh(form,field,val){
	//alert(form+','+field+','+val);
	document.forms[form][field].value=val;
	document.forms[form].submit();
}

function fixPNG(myImage,urll){
//	if (window.ie55up){
		var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
		var imgStyle = "display:inline-block;" + myImage.style.cssText 
		var strNewHTML = "<span " + imgID + imgClass + imgTitle
		strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
		strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\">";
		if ( urll ){ 
		strNewHTML += "<a href=\"" + urll + "\"><img src=\"images/empty.gif\" width=\"" + myImage.width + "\" height=\"" + myImage.height + "\" border=\"0\"></a>" ;
		}
		strNewHTML += "</span>" ;
		myImage.outerHTML = strNewHTML
//	}
}

