// JavaScript Document
function colorTween(id,style,from,to)
{
	colorTweenn = new ColorTween(id.style, style, Tween.regularEaseOut, from, to,1);
	colorTweenn.start()
}

/////////////////mouse cursor///////////////////

function getMouseXY(e) 
{
  if (IE) 
  { // grab the x-y pos.s if browser is IE
  	//alert(document.body.scrollTop);
    tempX = event.clientX + document.documentElement.scrollLeft;
    tempY = event.clientY + document.documentElement.scrollTop;
  } 
  else 
  {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX;
    tempY = e.pageY;
  }  
  // catch possible negative values in NS4
  if (tempX < 0)
  {
  	tempX = 0
  }
  if (tempY < 0)
  {
  	tempY = 0
  }  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  document.getElementById("popupVreme").style.left = tempX+5+"px";
  document.getElementById("popupVreme").style.top = tempY+5+"px";
  //document.getElementById("izjavaTednaPopUp").style.display="block";
  
  return true
}

function showPopUp(layer,h0,h1,w0,w1)
{
		
	document.getElementById(layer).style.display="block";
	
	var myEffect = new Fx.Morph(layer, {duration: 'long', transition: Fx.Transitions.Sine.easeOut});
 
myEffect.start({
    'height': [h0, h1], //Morphs the 'height' style from 10px to 100px.
    'width': [w0, w1]  //Morphs the 'width' style from 900px to 300px.
});

}

function hidePopUp(layer,h,w)
{
	var myEffect2 = new Fx.Morph(layer, {duration: 'short', transition: Fx.Transitions.Sine.easeOut});
 
myEffect2.start({
    'height': h, //Morphs the height from the current to 100px.
    'width': w   //Morphs the width from the current to 300px.
});

	setTimeout('document.getElementById("'+layer+'").style.display="none"', 300);
}

function clearField()
{
	document.getElementById('listMail').value="e-mail..."; 
	document.getElementById('nameMail').value="ime i priimek";
}

function showHideLayer(id)
{
	if(document.getElementById(id).style.display=='none')
		document.getElementById(id).style.display='block';
	else
		document.getElementById(id).style.display='none';
}
