// JavaScript Document
<!--
var newWindow = null
function windowOpener(loadpos,IntW,IntH)
{
	if (! newWindow || newWindow.closed)
	{
		if (IntW==0 && IntW==0)
		{
			newWindow = window.open(loadpos);
		}
		else
		{
  	newWindow = window.open(loadpos,"surveywin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+IntW+",height="+IntH+",top=150,left=150");
		}
	newWindow.focus();
	}else
	{
		newWindow.focus();
	}
}
var flag=false;
function DrawImage(ImgD,ImgW,ImgH){
   var image=new Image();
   var ImgW=ImgW;
   var ImgH=ImgH;
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= ImgW/ImgH){
     if(image.width>ImgW){ 
     ImgD.height=(image.height*ImgW)/image.width;  
                                               
     ImgD.width=ImgW;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt="size£º"+image.width+" "+image.height;
     }
    else{
     if(image.height>ImgH){ 
     ImgD.width=(image.width*ImgH)/image.height; 
     ImgD.height=ImgH;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt="size£º"+image.width+" "+image.height;
     }
    }
} 

function Login_CheckPage(theForm)
{
  if (theForm.page.value == "")
  {
    alert("Forget filling the pages£¡");
    theForm.page.focus();
    return (false); 
  }

  if (theForm.page.value == "0")
  {
    alert("Wrong page format!");
    theForm.page.focus();
    return (false);
  } 

  var checkOK = "0123456789";
  var checkStr = theForm.page.value; 
  var allValid = true;
  var decPoints = 0;
  var allNum = ""; 
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j)) 
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please insert figure!");
    theForm.page.focus();
    return (false);
  }
  return (true);
}

  //-->
