function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}

/* FIX LEFTCOL */
$(document).ready(function(){
	
	var mH = $('#maincontainer').height();
	
	$('body').height(mH);
	$('html').height(mH);

});

/* SEARCH */

function clearSearch(myObj) {
	if(myObj.value == 'Keresés az oldalon') {
		myObj.value = ''; 
		myObj.style.color = '#ffffff'; 
	}
}

function setSearch(myObj) {
	if(myObj.value == '') {
		myObj.value = 'Keresés az oldalon';
		myObj.style.color = '#666666';
	}
}

/* FORM BGR */

function setBgr(myObj) {
	myObj.style.backgroundColor = '#484848';
}

function clearBgr(myObj) {
	myObj.style.backgroundColor = '#282828';
}

/* BOOKMARK */

function bookmark() {
	bookmarkurl="http://www.oart.hu/"
	bookmarktitle="Oravecz Attila fotóművész honlapja"
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
	else if (window.sidebar) // firefox
	window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}