// javascripts.js
// Author: Alexander Aberer
// Date: 27.7.2000
// Last modified: 27.7.2000

function rand(n) {return (Math.floor(Math.random()*n));}
var same = rand(10000000)

function szamol(mitszamoljon){
  var now = new Date();
  var my_time = now.getTime();
  var counter_image = new Image;
  counter_image.src = 'http://www.boon.hu/scripts/counter.aspx?same='+same+'&time='+my_time+'&url='+document.URL+'&object='+mitszamoljon; 
};
        
<!-- ActiveAgent bannertag start -->
var ads="http://ads.hu.activeagent.at";

function aa_banner(w,h,id,orgatag){
	now = new Date();
	var transID = now.getTime();
	  document.write('<NOLAYER>');
	  document.write('<iframe name="aa_banner" width="'+w+'" vspace="0" hspace="0" marginheight="0" marginwidth="0" sr'+'c="'+ads+'/html.ng/TransactionID='+transID+id+'&'+orgatag+'?" height="'+h+'" frameborder="0" scrolling="no">');
	  document.write('<a href="'+ads+'/click.ng/TransactionID='+transID+id+'&'+orgatag+'?" target="_blank"><img sr'+'c="'+ads+'/image.ng/TransactionID='+transID+id+'&'+orgatag+'?" width="'+w+'" height="'+h+'" border="0" alt=""></a>');
	  document.write('</iframe>');
	  document.write('</NOLAYER>');
	  document.write('<ilayer visibility="show" width="'+w+'" height="'+h+'" id="id'+id+'"></ilayer>');

}

function aa_footer(w,h,id,orgatag){
	now = new Date();
	var transID = now.getTime();
	document.write('<layer name="aa_banner" sr'+'c="'+ads+'/html.ng/TransactionID='+transID+id+'&'+orgatag+'?" visibility="hide" clip="0,0,'+w+','+h+'" onlo'+'ad="moveToAbsolute(id'+id+'.pageX, id'+id+'.pageY);visibility=\'show\';"></layer>');
	}

<!-- ActiveAgent bannertag end -->

	function SwitchWebservice(switchform,formelement) {
		var fe, dummy;
		if(typeof formelement != "undefined") {
			fe = formelement;
		} else {
			fe = switchform.elements[0];
		}
		if (fe.selectedIndex != 0) {
			var pulldownindex = fe.selectedIndex;
			var url = fe.options[pulldownindex].value;
			locarray = url.split("|");
			if ( locarray.length > 1 ) {
				windata = locarray[0].split(",");
				dummy = open_window(locarray[1],windata[0],windata[1],windata[2],0,0,"scrollbars=" + windata[3] + ",location=no,toolbar=no,status=no,menubar=no,resizable=yes,dependent=yes");
			} else {
				dummy = open_window(url,"",700,480,10,10,"location=yes,toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,dependent=no");
			}
	 	}
	}
	
	function realmedia(path,name,content) {
		var dummy;
		var url = "http://www.vol.at/realmedia/embed.asp?cont=" + content + "&title=" + escape(name) + "&file=" + escape(path);
		if (content == "video") {
			dummy = open_window(url,"rc_video",230,305,10,10,"resizable=yes");
		} else {
			dummy = open_window(url,"rc_audio",400,40);
		}
		//return false;
	}
	
	function open_window(target,name,width,height,posx,posy,windowoptions,init_target) {
		var it, wo, px, py

		it = target;
		wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes,top=1,left=1";
		px = py = 0;
		if (typeof posx != "undefined") px = posx;
		if (typeof posy != "undefined") py = posy;
		if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions;
		if (typeof init_target != "undefined") it = init_target;

		if(typeof new_window != "undefined") {
			if(new_window.closed != true) {
				new_window.close();
			}
		}
		new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo);
		new_window.location.replace(target);
		new_window.focus();
		return false;
	}

	function open_window_age(target,name,width,height,posx,posy,windowoptions,init_target) {
		var it, wo, px, py
	if (self.confirm("Tényleg elmúlt 18 éves?")) {
		it = target;
		wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes,top=1,left=1";
		px = py = 0;
		if (typeof posx != "undefined") px = posx;
		if (typeof posy != "undefined") py = posy;
		if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions;
		if (typeof init_target != "undefined") it = init_target;

		if(typeof new_window != "undefined") {
			if(new_window.closed != true) {
				new_window.close();
			}
		}
		new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo);
		new_window.location.replace(target);
		new_window.focus();
	}
		return false;
	}

	function open_nav(target,name,width,height,navtype,posx,posy,windowoptions,init_target) {
		var it, wo, px, py, host;
		
		width=170;
		
		switch(navtype) {
			case "service":
			 height=350;
			 break;
			case "news":
			 height=350;
			 break;
			case "funfriends":
			 height=400;
			 break;
			case "internet":
			 height=185;
			 break;
			default:
			 height=350;
			 break;
		}
		it = target;
		wo = "location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=no,dependent=yes";
		px = py = 0;

		if(typeof new_window != "undefined") {
			if(new_window.closed != true) {
				new_window.close();
			}
		}

		if (typeof posx != "undefined") px = posx;
		if (typeof posy != "undefined") py = posy;
		if ((typeof windowoptions != "undefined") && (windowoptions != "")) wo = windowoptions;
		if (typeof init_target != "undefined") {
			it = init_target;
		} else {
			if (target.indexOf("http://") != -1) {
				host = "http://" + window.location.hostname;
				if (target.indexOf(host) == -1) it = blank_page;
			}
		}
		new_window = window.open(it,name,"width=" + width + ",height=" + height + "," + wo);
		new_window.moveTo(px,py);
		new_window.location.replace(target);
		new_window.focus();
		return false;
	}

	function setUrlForPrint() {
		sUrl = document.location.href;
		if ((document.all) || (document.layers)){
			sUrl = sUrl.replace(/\?/, "\\/");
			sUrl = sUrl.replace(/\&/, "//");
		}
		document.printform.url.value = sUrl;
	}

  function openorder() {
    window.open("/oldalak/download/OrderISP/order_client.asp", "ORDER", "width=660, height=600, top=1, left=1, location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=yes,dependent=yes");
  }

  function openorderbusiness() {
    window.open("/oldalak/download/OrderISP/orderbusiness_client.asp", "ORDER", "width=660, height=660, top=1, left=1, location=no,toolbar=no,status=no,statusbar=no,scrollbars=no,resizable=yes,dependent=yes");
  }
