//include ('wz_tooltip.js');
//include ('tip_balloon.js');

function include(fileName) {
	document.write('<script type="text/javascript" src="' + stylesheetDirectory + '/js/' + fileName + '"></scr' + 'ipt>'); 
}

function addLoadEvent(func) { 
	var oldonload = window.onload; 
	if (typeof window.onload != 'function') { 
		window.onload = func; 
	} else { 
		window.onload = function() { 
			if (oldonload) { 
				oldonload(); 
			} 
			func(); 
		} 
	} 
} 

function imagePreload() {
	pic = new Array(4);

	for (index = 1 ; index <= 4 ; index ++ ) {
		pic[index-1] = new Image(10,10);
		pic[index-1].src = 'konfliktus-on'+index+'.png';
	
	}	
}	

function showImage(numberOfImage) {
	image = document.getElementById('konfliktusKep');
	if (image != null) {
		if (numberOfImage == null) {
			image.src = 'http://jogondolat.hu/wp-content/uploads/2009/09/konfliktus-ures.png';
		}
		else {
			image.src = 'http://jogondolat.hu/wp-content/uploads/2009/09/konfliktus-on'+numberOfImage+'.png';
		}	
	}
}

function deleteMarginForTheFirstH1() {
	mainContainer = document.getElementById('mainContentContainer');
	mainContainer.getElementsByTagName('h1').item(0).style.marginTop = '10px';
}

try {
	addLoadEvent(imagePreload);
	addLoadEvent(showImage);
	addLoadEvent(deleteMarginForTheFirstH1);
}
catch (err) {}

