function elementVisibility(element,visible){
	if(visible=="TRUE"){
		document.getElementById(element).style.visibility='visible';
	}else{
		document.getElementById(element).style.visibility='hidden';
	}
}

function copyr(element){	
		document.getElementById(element).style.visibility='visible';	
		for(i=0;i<4;i++){			
			if(('copy' + i) != element){
				document.getElementById('copy' + i).style.visibility='hidden';
			}
		}
}

function pictureChange(element,src){
	eval("document.getElementById('"+element+"').src='"+src+"'");
}

function newWindow(targetContent,title, wx,wy){
			
	frm = eval("window.open(targetContent,'" + title + "','width=" + wx + ",height=" + wy + ",status=no,scrollbars=no,menubar=no,toolbar=no,location=no,dependent=yes,hotkeys=no,resizable=no,left=10px,top=10px,screenX=10px,screenY=10px')");
	
	//window.open(targetContent,'newWindow','width=' + wx + ',height=' + wy + ',status=no,scrollbars=no,menubar=no,toolbar=no,location=no,dependent=no,hotkeys=no,resizable=no,left=10px,top=10px,screenX=10px,screenY=10px,status=no');
}

function swapImgRestore() {
  	var i;
  	var x;
  	var a=document.pol_sr; 
  	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	function preloadImages() { 
  	var d=document; 
  	if(d.images){ if(!d.pol_p) d.pol_p=new Array();
    var i,j=d.pol_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.pol_p[j]=new Image; d.pol_p[j++].src=a[i];}}
	}

	function findObj(n, d) { 
  	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=findObj(n,d.layers[i].document);
  	if(!x && d.getElementById) x=d.getElementById(n); return x;
	}

	function swapImage() { 
  	var i;
  	var j=0;
  	var x;
  	var a=swapImage.arguments; 
  	
  	document.pol_sr=new Array; 
  	for(i=0;i<(a.length-2);i+=3){
   		if ((x=findObj(a[i]))!=null){
   				document.pol_sr[j++]=x; 
   				if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
   		}
   	}
}
function preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
