// JavaScript Document
function showGallery( oid ){
	props = "toolbar=0,location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=490,height=470,top=50,left=50";
	var win = window.open( "/gallery-frame.php?oid="+oid, "PopupWin", props );
	win.focus();
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}
function MM_hideOtherLayers(id) {
	var thisLayer = MM_findObj(id);
	for (var i=0; i <= 5; i++) {
		var otherLayer = MM_findObj('map' + i);
		if (otherLayer != thisLayer) {
			otherLayer.style.display = 'none';
		}
	}
}

var menuNo = 8;
var timeout;
function MM_show(objName) {
	clearTimeout(timeout);
	document.getElementById(objName).style.visibility = 'visible';
	MM_hideOther(objName);
}
function MM_hide(objName) {
    timeout=setTimeout("MM_hideActive('" + objName + "')", 300);
}
function MM_hideOther(objName) {
	var obj = MM_findObj(objName);
	for (var i=1; i<=menuNo; i++) {
		var hideLayer = MM_findObj('menuSub' + i);
		if (hideLayer != obj) {
			hideLayer.style.visibility = 'hidden';
		}
	}
}
function MM_hideActive(objName) {
	document.getElementById(objName).style.visibility = 'hidden';
}

function downLayer(layerId) {
	var actLayer = findLayer(layerId + '_sub');
	var mainLayer = findLayer(layerId);
	if (actLayer.style.display == '') {
		actLayer.style.display = 'none';
		mainLayer.className = 'folderClose';
	} else {
		actLayer.style.display = '';
		mainLayer.className = 'folderOpen';
	}
}

function findLayer(item) {
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.getElementById) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	return(false);
}

function windowAutoResize() {
	var contentholder = document.getElementById('pic');
	window.resizeTo(0,0);
	window.resizeBy(contentholder.offsetWidth, contentholder.offsetHeight + 10);
}

function sendFPForm( form ) {
    switch ( form ) {
	case 'f_l':
	    select = 'language';
	break;
	case 'f_c':
	    select = 'country';
	break;
    }
    
    selected = document.getElementById( select );
    if ( selected.value == 0 ) {
	document.getElementById( 'f_empty' ).submit();
    } else {
	document.getElementById( form ).submit();
    }
}

flash=function(f,w,h,v){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+(v?v:6)+'" width="'+w+'" height="'+h+'" data="'+f+'"><param name="movie" value="'+f+'" /><param name="quality" value="high" /><embed src="'+f+'" quality="high" width="'+w+'" height="'+h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>')
}

