///////////////////////////////////////////////////
// Common interface javascript functions
///////////////////////////////////////////////////
function myAccount()
{
	alert('Please, you are not logged in!');	
}


function openPopUp(url,ref,w,h)
{
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	//
	window.open (url, ref, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}

///////////////////////////////////////////////////
// Change text size
///////////////////////////////////////////////////

var min=11;
var max=18;
//
function increaseFontSize() 
{
   var p = document.getElementsByTagName('p');
   //
   for(i=0;i<p.length;i++) 
   {
      if(p[i].style.fontSize) 
	  {
		var s = parseInt(p[i].style.fontSize.replace("px",""));
      } 
	  else {
        var s = 12;
      }
      if(s!=max) 
	  {
        s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}

function decreaseFontSize() 
{
   var p = document.getElementsByTagName('p');
   //
   for(i=0;i<p.length;i++) 
   {
      if(p[i].style.fontSize) 
	  {
		var s = parseInt(p[i].style.fontSize.replace("px",""));
      } 
	  else {
		var s = 12;
      }
      if(s!=min) {
		s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}

///////////////////////////////////////////////////
// Clear form field
///////////////////////////////////////////////////

function clickclear(thisfield, defaulttext) 
{
	if (thisfield.value == defaulttext) 
	{
		thisfield.value = "";
	}
}


function clickrecall(thisfield, defaulttext) 
{
	if (thisfield.value == "") 
	{
		thisfield.value = defaulttext;
	}
}

///////////////////////////////////////////////////