function setActionValue( value ) {
	actionInput = document.getElementById('action');
	actionInput.value = value;
}

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

function changeAction(formId) {
	select = document.getElementById(formId+"Select");
	form = document.getElementById(formId);
	form.action = select.options[select.selectedIndex].value;
}

function sendPopup( oid ) {
	props = "toolbar=0,location=0,status=0,scrollbars=0,menubar=0,resizable=0,width=400,height=425,top=50,left=50";
    var win = window.open("/cikk-kuldes.php?url="+oid,"SendLinkWin",props);
    win.focus();
}

function printPopup( url ) {
	props = "toolbar=0,location=0,status=0,scrollbars=1,menubar=0,resizable=0,width=500,height=600,top=50,left=50";
    var win = window.open(url,"PrintLinkWin",props);
    win.focus();
}

function displayFlashObject( path, w, h, id, bg ) {
	if ( document.all ) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + w + '" height="' + h + '" id="' + id + '" align="middle">');
		document.write('        <param name="allowScriptAccess" value="sameDomain">');
		document.write('        <param name="movie" value="' + path + '">');
		document.write('        <param name="quality" value="high">');
		document.write('        <param name="wmode" value="transparent">');
		document.write('        <param name="bgcolor" value="' + bg + '">');
		document.write('</object>');
	} else {
		document.write('<div style="z-index: -1"><object data="' + path + '" width="' + w + '" height="' + h + '" id="' + id + '" type="application/x-shockwave-flash">');
		document.write('        <param name="quality" value="high">');
		document.write('        <param name="wmode" value="transparent">');
		document.write('        <param name="bgcolor" value="' + bg + '">');
		document.write('        <param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">');
		document.write('</object></div>');
	}
}

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 showHideLayer(layerId) {
	if (document.getElementById(layerId).style.display == 'none') {
		document.getElementById(layerId).style.display = 'block';
	}
	else {
		document.getElementById(layerId).style.display = 'none';
	}
}

function changeVisibility(id1,id2,id3,id4) {
	first = document.getElementById(id1)
	second = document.getElementById(id2)
	if( id3 ) {
	    third = document.getElementById(id3)
	} else {
	    third = false;
	}
	if( id4 ) {
	    fourth = document.getElementById(id4)
	} else {
	    fourth = false;
	}
	if (first.className == 'formRowHidden') {
		first.className = 'formRow';
		second.className = 'formRow';
		if ( third ) {
    		third.className = 'formRow';
		}
		if ( fourth ) {
    		fourth.className = 'formRowHidden';
		}
	} else {
		first.className = 'formRowHidden';
		second.className = 'formRowHidden';
		if ( third ) {
    		third.className = 'formRowHidden';
		}
		if ( fourth ) {
    		fourth.className = 'formRow';
		}
	}
}

function changeVisibility3(id1,id2,id3) {
	first = document.getElementById(id1)
	second = document.getElementById(id2)
    third = document.getElementById(id3)
	if (first.className == 'formRowHidden') {
		first.className = 'formRow';
		second.className = 'formRowHidden';
		third.className = 'formRowHidden';
	} else {
		first.className = 'formRowHidden';
		second.className = 'formRow';
		third.className = 'formRow';
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
