function showHideDiv(divID) { divID.style.display=divID.style.display=="none" ? "block" : "none" }
function showDiv(divID) { divID.style.display="block" }
function hideDiv(divID) { divID.style.display="none" }
function openWin(url,w,h,sc,re){ var leftP = (screen.width) ? (screen.width-w)/2 : 0; var topP = (screen.height) ? (screen.height-h)/2-50 : 0;  window.open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+sc+",resizable="+re+",WIDTH="+w+",HEIGHT="+h+",top="+topP+",left="+leftP);}
function change_height(iframeName) {if(document.getElementById && !(document.all)) {height = document.getElementById(iframeName).contentDocument.body.scrollHeight; document.getElementById(iframeName).style.height = height; } else if(document.all) {height = document.frames(iframeName).document.body.scrollHeight; eval('document.all.'+iframeName+'.style.height = height;');} }
function showBan(idRoll,divName,sizeStr,wmode,src,bgcolor) { var d=document.getElementById(divName); var obj='<OBJECT id="'+idRoll+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '+sizeStr+' >'+wmode+'<PARAM NAME="movie" VALUE="'+src+'"><PARAM NAME="quality" VALUE="high" /><param name="bgcolor" value="'+bgcolor+'" />	<param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><EMBED src="'+src+'" quality="high" '+sizeStr+' bgcolor="'+bgcolor+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>'; d.innerHTML=obj;}
////////////////////////////////////////////////////////////////////////////////////////
// check textarea of form if over num of letters
function isThisNum(str){
var legal = true;
var i;
for (i=0; i<str.length; i++) {
	ch = str.substring(i,i+1)
	if ((str.length==0) || (ch !="0" && ch !="1" && ch !="2" && ch !="3" && ch !="4" && ch !="5" && ch !="6" && ch !="7" && ch !="8" && ch !="9")) {
		legal = False
		break
	}
}
return legal
} //end function

function isThereHeb(str){
var legal = false;
var i;
for (i=0; i<str.length; i++) {
	ch = str.substring(i,i+1)
	if (ch>="à" && ch<="ú") {
		legal = true
		break
	}
}
return legal
} //end function

function isThereBadDigits(str){
var legal = false;
var i;
for (i=0; i<str.length; i++) {
	ch = str.substring(i,i+1)
	if (ch=="<" || ch==">" || ch=="`" || ch=="~" || ch=="*" || ch=="#" || ch=="/" || ch=="\\" || ch=="^") {
		legal = true
		break
	}
}
return legal
} //end function

function isLegalEmail(str) {
var legal = true;
var i;
if(isThereBadDigits(str) || isThereHeb(str)){
	legal = false
}
if((str.length<4) || (str.indexOf('@')<1) || (str.indexOf('.')<3)) {
	legal = false
}
return legal
}
/////////////////////////////////////////////////////////////////////////////////////////////////

/***********************************************
* Dock Content script- Created by and © Dynamicdrive.com
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full script
***********************************************/

var offsetfromedge=0      //offset from window edge when content is "docked". Change if desired.
var dockarray=new Array() //array to cache dockit instances
var dkclear=new Array()   //array to cache corresponding clearinterval pointers

function dockit(el, duration){
this.source=document.all? document.all[el] : document.getElementById(el);
this.source.height=this.source.offsetHeight;
this.docheight=truebody().clientHeight;
this.duration=duration;
this.pagetop=0;
this.elementoffset=this.getOffsetY();
dockarray[dockarray.length]=this;
var pointer=eval(dockarray.length-1);
var dynexpress='dkclear['+pointer+']=setInterval("dockornot(dockarray['+pointer+'])",100);';
dynexpress=(this.duration>0)? dynexpress+'setTimeout("clearInterval(dkclear['+pointer+']); dockarray['+pointer+'].source.style.top=0", duration*1000)' : dynexpress;
eval(dynexpress);
}

dockit.prototype.getOffsetY=function(){
var totaloffset=parseInt(this.source.offsetTop);
var parentEl=this.source.offsetParent;
while (parentEl!=null){
totaloffset+=parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function dockornot(obj){
obj.pagetop=truebody().scrollTop;
if (obj.pagetop>obj.elementoffset) //detect upper offset
obj.source.style.top=obj.pagetop-obj.elementoffset+offsetfromedge+"px";
else if (obj.pagetop+obj.docheight<obj.elementoffset+parseInt(obj.source.height)) //lower offset
obj.source.style.top=obj.pagetop+obj.docheight-obj.source.height-obj.elementoffset-offsetfromedge+"px";
else
obj.source.style.top=0;
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
/////////////////////////////////////////////////