﻿// JavaScript Document
//2008-08-28 10:20
function getWH()
{
		if( window.innerHeight && window.scrollMaxY ){ // Firefox 
			pageHeight = window.innerHeight + window.scrollMaxY;
		}else if( document.body.scrollHeight > document.body.offsetHeight ) // all but Explorer Mac
		{
			pageHeight = document.body.scrollHeight;
		}else{ // works in Explorer 6 Strict, Mozilla (not FF) and Safari 
			//pageHeight = document.body.offsetHeight + document.body.offsetTop; 
			//pageHeight = document.body.scrollHeight;
			pageHeight = 2300;
			//pageHeight = window.innerHeight + window.scrollMaxY;
		}

		return pageHeight;	
}//end func

//Loading Status 2008-09-30 .........
function Loading(msgbox,msg)
{
	if ($(msgbox).style.display == 'none') {
		new Effect.Appear(msgbox);
		
	}//end if
			
	$(msgbox).innerHTML = msg;
}//end func

function Finish(msgbox)
{
	new Effect.Fade(msgbox,{delay:0.5,duration:1,from:1,to:0});		
}//end func


//SetStyle 2005-10-01 .................
function overStyle(id,color)
{
	//Event.observe(id, 'mouseover', function() {
		$(id).setStyle({background:color});
	//});
}//end func

//GoTo 2009-04-15 .....................
function goTo(div_obj){new Effect.ScrollTo(div_obj,{offset:0,duration:0.2});};

//isCheckBox

//GoToUrl After INT Seconds
function goPage(sec,url){setTimeout("window.location.href='" + url + "'", sec);}//end func;

//Form Alert
function formAlert(id,size,color,bgcolor)
{
  var border=size+'px solid'+color;
  $(id).focus();
  $(id).style.backgroundColor = '#ffcc00';
  $(id).style.border = '3px solid #f30';
  goTo(id);	
};//end func

//Form Alert Clear
function formAlertClear(id,size,color,bgcolor)
{
  var border=size+'px solid'+color;
  $(id).style.backgroundColor = '#fff';
  $(id).style.border = '1px solid #000';	
};//end func
