	cim=new Array();
cim[0]="info@broadcasting.hu"
cim[1]="info@corg.hu"
function kuld(szam){
	document.write("<a onkeyup=\"if(blur()){this.blur()}\" onmouseup=\"if(blur()){this.blur()}\" href=\"mailto:"+cim[szam]+"\">"+cim[szam]+"</a>")	
}

function ablak (kep,w,h){

	window.open(kep,'df','width='+(w+30)+',height='+(h+30)+'status=0,scrollbars=0')
	return false

}

function onOffInit(){
	if (document.images) {
    	button1 = new Image()
    	button2 = new Image()
		button3 = new Image()
		button4 = new Image()
		button5 = new Image()
		button6 = new Image()
		button7 = new Image()

    	button1.src = 'user/blackmagic_over.gif'
    	button2.src = 'user/focus_over.gif'
		button3.src = 'user/tvone_over.gif'
		button4.src = 'user/digigram_over.gif'
		button5.src = 'user/stradis_over.gif'
		button6.src = 'user/canopus_over.gif'
		button7.src = 'user/kramer_over.gif'
	}	
}
function onOff(img_name,img_src) {
	document[img_name].src="user/"+img_src;
}


function tesztPiac(){
	with (document.piacterForm){
			if(!nev.value){
				alert("Nem írta be a nevét...")
				nev.focus()
				return false
			}
			if(!cegnev.value){
				alert("Nem írta be a cegnevét...")
				cegnev.focus()
				return false
			}
			if(!tel.value){
				alert("Nem írta be a telefonszámát...")
				tel.focus()
				return false
			}
			if(!ema.value){
				alert("Nem írta be a e-mail címet...")
				ema.focus()
				return false
			}
			if(ema.value && !check_email(ema.value)){
				alert("Nem írt be valós e-mail címet...")
				ema.value="";
				ema.focus()
				return false
			}
			if(!fNev.value){
				alert("Nem írta be a felhasználói nevét...")
				fNev.focus()
				return false
			}
			if (be.value=="nem" && !jelszo.value){
				alert("Nem adta meg a jelszót...")
				jelszo.focus()
				return false
			}
			if ((jelszo.value&& !jelszo1.value) || (jelszo.value && jelszo1.value && jelszo.value!=jelszo1.value)){
				
				alert ("A 2 megadott jelszó nem egyezik!");
				jelszo.focus()
				return false
			
			}
			
			if(!cim.value){
				alert("Nem írta be a hirdetés címét...")
				cim.focus()
				return false
			}
			if(!le.value){
				alert("Nem írta be a hirdetés szövegét...")
				le.focus()
				return false
			}
			
			if (kep.value){
				if (kep.value.substring(kep.value.length-3,kep.value.length)!="gif" && kep.value.substring(kep.value.length-3,kep.value.length)!="jpg" && kep.value.substring(kep.value.length-3,kep.value.length)!="png"){
					alert("ez a fájl nem kép..."+kep.value.substring(kep.value.length-3,kep.value.length))
					
					kep.focus()
					return false
					
				}
				
			}
			
			if(!captcha_code.value){
				alert("Nem írta be a biztonsági kódot...")
				captcha_code.focus()
				return false
			}
			if(!olvas.value || (olvas.value!="igen")){
				alert("Nem olvasta el a jogi feltételeket...")
				szab.checked=false
				szab.focus()
				return false
			}
			
			
			if (!szab.checked){
				alert("Nem olvasta el a jogi  feltételeket...")
				szab.focus()
				return false	
			}
			

			else{
				fontos.value="igen"	
			}
	}
}

function check_email(ee) {


	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";


	for(i=0; i < ee.length ;i++){


		if(ok.indexOf(ee.charAt(i))<0){


			return (false);

		}

	}


	if (document.images) {

		re1 = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;

		re_two1 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;

		if (!ee.match(re1) && ee.match(re_two1)) {

			return (-1);

		}

	}

}



kat=new Array()
function tunt(mimi){
	for (i=0;i<hany.length;i++ ){
		if (eval("n_"+i)){
			clearTimeout(eval("n_"+i));
			eval("n_"+i+"=''");
		}	
	
		//document.getElementById("al_"+kat[i]).style.visibility="hidden";
		if (document.getElementById("fo_"+hany[i]))
		document.getElementById("fo_"+hany[i]).style.visibility="hidden";
			
	}
}
function jel(szam,milyen){
	da=szam.split(",");
	
	for (i=0;i<da.length;i++ ){
		
		document.getElementById("fo_"+da[i]).style.visibility=milyen;
	
		
	}
	if (milyen=="hidden")
			hany.pop();
	
	
}

function kika(){
	for (i=0;i<hany.length;i++ ){	
		if (eval("n_"+i)){
			clearTimeout(eval("n_"+i));
			document.getElementById("fo_"+hany[i]).style.visibility="visible";
		
			eval("n_"+i+"=''");
		}
	
	}

}
function lassit(){
	for (i=0;i<hany.length;i++ ){
		if (document.getElementById("fo_"+hany[i]) && document.getElementById("fo_"+hany[i]).style.visibility=="visible")
			eval("n_"+i+"=setTimeout(\"jel('"+hany[i]+"','hidden')\",500)");	
	}	
}
hany=new Array()

function betesz(mi,x,y){
	x=x+"px";
	y=y+"px"
	if (document.getElementById("al_"+mi)){
		document.getElementById("fo_"+mi).innerHTML=document.getElementById("al_"+mi).innerHTML;
		document.getElementById("fo_"+mi).style.visibility="visible";
		document.getElementById("fo_"+mi).style.left=x
		document.getElementById("fo_"+mi).style.top=y
		hany[hany.length]=mi

	}
	
	
}

