var tp = "fileadmin/templates/caleb2/";

function hoverButon(id,name,on) 
{
   var buton=document.getElementById(id);
   //buton.style.backgroundPosition="-57px 0";
   buton.style.backgroundImage="url("+tp+"./img/"+name+"-2.jpg)";
}
function hoverButonOut(id,name,on) 
{
   var buton=document.getElementById(id);
   //buton.style.backgroundPosition="0 0";

   if(on!='') { buton.style.backgroundImage="url("+tp+"./img/"+name+"-1.jpg)"; }
}
function hoverTrimite(id) 
{
   var buton=document.getElementById(id);
   buton.style.backgroundPosition="0 -37px";
}
function hoverTrimiteOut(id) 
{
   var buton=document.getElementById(id);
   buton.style.backgroundPosition="0 0";
}
function openClose(id)
{
    var block=document.getElementById('openCloseBlock'+id);
    if (block)
    {
        var folder=document.getElementById('openClose'+id);
	var label=document.getElementById('openCloseBlockLabel'+id);
        if (block.style.display=="block")
        {
            folder.style.backgroundPosition="right 0";
            block.style.display="none";
		label.innerHTML = 'deschide';
            }
            else
            {
                folder.style.backgroundPosition="right -66px";
                block.style.display="block";
		label.innerHTML = 'inchide';
                }
    }
    return false;
}

function jumpto(url) {

	//parent.location.href = url;	
	window.open(url,'cccaleb','');

}
function jumpto2(url) {

	parent.location.href = url;	

}

if(/Safari/.test(navigator.userAgent))
{
 //you are using safari, or at least you CLAIM to be
	var headID = document.getElementsByTagName("head")[0];         
	var cssNode = document.createElement('link');
	cssNode.type = 'text/css';
	cssNode.rel = 'stylesheet';
	cssNode.href = tp+'./css/safari.css';
	//cssNode.media = 'screen';
	headID.appendChild(cssNode);
}
