	function pop_up_param (iw, ih) {
		var adj=10
		var w = screen.width;
		var h = screen.height;
		var byFactor=1;

		if(w<740) {
			var lift=0.90;
		}

		if(w>=740 & w<835) {
			var lift=0.91;
		}

		if(w>=835) {
			var lift=0.93;
		}
	   
		var scrWidth = w-adj;
		var scrHeight = (h*lift)-adj;

		var posLeft=0;
		var posTop=0;

		var scrHeightTemp = ih - 0;

		if (scrHeightTemp < scrHeight) {
			scrHeight = scrHeightTemp;
		} 

		var scrWidthTemp = iw - 0;

		if (scrWidthTemp < scrWidth) {
			scrWidth = scrWidthTemp;
		}
	  
		if (scrHeight<100) {
			scrHeight=100;
		}

		if (scrWidth<100) {
			scrWidth=100;
		}

		posTop =  ((h-(scrHeight/lift)-adj)/2);
		posLeft = ((w-(scrWidth)-adj)/2);

		posTop = parseInt(posTop);
		posLeft = parseInt(posLeft);		

		s_top=posTop;
		s_left=posLeft;
	}

	function SendEmail( Link ) {
		var comwin; 

		pop_up_param (500, 400);

		comwin = window.open("email.php3"+Link, "View","width=500,height=400,scrollbars=no,resizable=no,left="+this.s_left+",top="+this.s_top);
		comwin.focus() ;	    
	}

	function selectURL (obj,v) {
		v = obj.options[obj.options.selectedIndex].value
		if (v) document.location = 'index.php3?' + v
	}

	function enable(form) {
		document.getElementById("news_from").disabled = ! document.getElementById("news").checked;
		document.getElementById("news_till").disabled = ! document.getElementById("news").checked;
	}

