﻿function telepulesek( tel ){
	var x = createConnection( tel );
	//alert(x);
	//document.getElementById("varosSelect").innerHTML = x;
	document.getElementById("vd").innerHTML = x;

}

function createConnection( parameter ){
	var xmlhttp;
	var browser = navigator.userAgent;
	if ( browser.indexOf("Gecko") !=-1 || browser.indexOf("Firefox") !=-1 || browser.indexOf("Opera") !=-1 )
		xmlhttp = new XMLHttpRequest();
	if ( browser.indexOf("MSIE") !=-1 ) {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");	
	}
	xmlhttp.open('POST', 'commons/countyList.php?megye='+parameter, false);
	xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded;');
	xmlhttp.send(parameter);

	return xmlhttp.responseText;
}

function video( vUrl, winName ){
	window.open( "media/player.php?vid="+vUrl, winName, "width=400, height=350, toolbar=no, resizable=no, status=no, titlebar=no, scrollbars=no, directories=no, location=no, hotkeys=no" );
}

function videoResize( vUrl, winName, fWidth, fHeight ){
	winWidth = fWidth; 
	winHeight = Number(fHeight)+10; 
	window.open( "media/playerResize.php?vid="+vUrl+"&w="+fWidth+"&h="+fHeight, winName, "width="+winWidth+", height="+winHeight+", toolbar=no, resizable=no, status=no, titlebar=no, scrollbars=no, directories=no, location=no, hotkeys=no" );
}

function videoFix( vUrl, winName ){
	window.open( "media/playerFix.php?vid="+vUrl, winName, "width=530, height=490, toolbar=no, resizable=no, status=no, titlebar=no, scrollbars=no, directories=no, location=no, hotkeys=no" );
}

function sound( aUrl, winName ){
	window.open( "media/audioplayer.php?aid="+aUrl, winName, "width=400, height=90, toolbar=no, resizable=no, status=no, titlebar=no, scrollbars=no, directories=no, location=no, hotkeys=no" );
}

function selectProduction( obj, src ){
	obj.style.background = "url('terv/"+src+"') no-repeat";
}

function changeClass( obj, styleClass ){
	obj.className = styleClass;
}

function showPicture(foto, fototitle){
	window.open("photoview.php?url="+foto+"&ftitle="+fototitle, "photoview", "width=200px, height=100px, statusbar=0, status=0");
}

var actTagId = ""; 
function mutatTag( id ){	
	if( document.getElementById(actTagId) ) document.getElementById(actTagId).style.display = "none";
	actTagId = id;
	document.getElementById(id).style.display = "block";	
}
function rejtTag( id ){
	document.getElementById(id).style.display = "none";
}

function googleTerkep( hely ){
	doc = document.forms.q_form;
	doc.q.value = hely;
	doc.submit();
}

