function imgHighlight(item, highlight)
{
        var cacheImage = new Image();
        var imgName = item;
        if (highlight==true)
        {
        	cacheImage.src = imgName.src.replace('1', '2');
       	}
       	else
       	{
       		cacheImage.src = imgName.src.replace('2', '1');
       	}
        imgName.src = cacheImage.src;
}

function showHideUploader(rowid)
{
	uploadrow = document.getElementById(rowid);
	
	if (uploadrow.style.display=="none") uploadrow.style.display = "";
	else uploadrow.style.display = "none";
}

function selectall(formname, selectstatus)
{
	objects = document.forms[formname].elements;
	var count_chkboxes = 0;
	for (i=0;i<objects.length;i++)
	{
		if (objects[i].type=='checkbox')
		{
			objects[i].checked = selectstatus;
		}
	}
}

function checkIEVer()
{
        if ((navigator.appVersion.indexOf("MSIE 6.0") > 0 || navigator.appVersion.indexOf("MSIE 7.0") > 0 || navigator.appVersion.indexOf("MSIE 5.5") > 0 ) &&  navigator.appVersion.indexOf("Trident") < 0   )
        {
                //$('body').css('margin', '0px');
                document.getElementById('upgrade-hold').innerHTML = "<div id='ie-upgrade'><img id='ieupgradelogo' src='/public/images/design/cimlap/ie-logo.gif' width='151' height='25' alt=''><span id='ieupgradelabel'>Kedves Látogatónk! Ön az Internet Explorer egy régi verzióját használja, melynek használatát biztonsági és technikai okok miatt nem javasoljuk. Kérjük, hogy <a href='http://www.microsoft.com/hun/windows/internet-explorer/'>töltse le a legfrissebb 8-as verziót.</a> <a href='http://www.iminet.hu/egyeb/informaciok/nem-javasolt-az-internet-explorer-6-hasznalata.html'>További információkért kattintson ide!</a> </span><a href='javascript: upgradeClose();' id='ieupgradeclose'>BEZÁR</a></div>";

        }
}

function upgradeClose()
{
        document.getElementById('upgrade-hold').style.display = 'none';
        $('body').css('margin', '10px');
}


/* -- IWIW megosztás -- */
function iwiwshare_click()
{
        u=location.href;
        t=document.title;
        window.open('http://iwiw.hu/pages/share/share.jsp?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'iwiwshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
        return false;
}
/* -- IWIW megosztás -- */


/* -- Facebook megosztás -- */
function facebookshare_click()
{
        u=location.href;
        t=document.title;
        window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'facebookshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
        return false;
}
/* -- IWIW megosztás -- */


/* -- Twitter megosztás -- */
function twittershare_click()
{
        u=location.href;
        t=document.title;
        window.open('http://twitter.com/home?status='+encodeURIComponent(u),'facebookshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
        return false;
}
/* -- Twitter megosztás -- */

/* -- Windows Live Favorites megosztás -- */
function windowsliveshare_click()
{
        u=location.href;
        t=document.title;
        window.open('http://favorites.live.com/quickadd.aspx?url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t),'windowsliveshare','toolbar=0,status=0,location=1, width=650,height=600,scrollbars=1');
        return false;
}
/* -- Windows Live Favorites megosztás -- */

