var noahLoc="/NOAHFILES/";
var partnerID=0;
var useCookies=false;
var CookieLength=3;
var StopOnLoad=2;
var SoundFile="";
var allowDisable=true;
var allowDock=true;
var autoScroll=true;
var showText=true;
var cbSkin=noahLoc+"CBMALE.SWF";
var ua=navigator.userAgent;
var IE=navigator.appName.indexOf("Microsoft")!=-1?true:false;
var Win=navigator.appVersion.indexOf("Windows")!=-1?true:false;
var isOpera=ua.indexOf("Opera")>=0?true:false;
var isFF=ua.indexOf("Firefox")>=0?true:false;
var oVer=!isOpera?8:Number(ua.substr(ua.indexOf("Opera")+6,3));
var isOK=oVer>=8 && !(!Win && IE)?true:false;
var useFS=Win && IE && !isOpera?1:0;
if (isOK)
{
	try
	{
		StopOnLoad=cbStopOnLoad;
		isOK=false;
		alert("This page is not configured for the new script and engine.");
	}
	catch(e)
	{
	}
}
var initScroll=false,cOK=false,nDots=new Array(0),isStatic=true,cDown=false;
var cbObj=null,dbObj=null,cbDiv=null,dbDiv=null,inDiv=null,cmDiv=null,hiDiv=null,noDiv=null,isInit=false,isLoad=false,nInit=false;
var curX=0,curY=0,InitX=-1,InitY=-1,tempX=0,tempY=0,isP="0",PassX=0,passY=0;
var isDrag=false,avH=50,avW=50,mouseX,mouseY,isM=false,zavW,zavH;
var wLay=null,wLayW=0,wLayH=0,wLayX=0,wLayX=0,mm=0,jTMR=false;
var fa=false,lYoff,lXoff,dotX=-1,dotY=0,dotD=15;
var isNOAHdot=false;
var inH=false;
var isSSL=document.location.toString().toUpperCase().substr(0,5)=="HTTPS"?true:false;
var CBIDX=Math.round(Math.random()*65000);
var dLevel=document.location.search.indexOf("NS=")>=0?document.location.search.substr(document.location.search.indexOf("NS=")+3,1):0;
dLevel=dLevel;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
var evGetMouseXY=GetEvent(document.onmousemove);
var evWinResized=GetEvent(window.onresize);
var evWinReady=GetEvent(window.onload);
var evWinDone=GetEvent(document.onunload);
if (isOK)
{
	document.onmousemove = GetMouseXY;
	window.onresize=WinResized;
	document.onunload=WinDone;
}
window.onload=WinReady;
function canFollow()
{
	isM=true;
}
function GetMouseXY(e) 
{
	var scrOfX=0,scrOfY=0;
	if( typeof( window.pageYOffset ) == 'number' ) 
	{
		scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;
	}
	else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
	{
		scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;
	} 
	else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
	{
		scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;
	}
	if (IE)
	{
		tempX=event.clientX+scrOfX;
		tempY=event.clientY+scrOfY;
	}
	else 
	{
		tempX=e.pageX;
		tempY=e.pageY;
	}
	cDown=!IE?e.shiftKey:event.shiftKey;
	if (tempX<0) tempX=0;
	if (tempY<0) tempY=0;  
	if ((tempX!=mouseX || tempY!=mouseY))
	{
		mouseX=tempX;
		mouseY=tempY;
		if (isM) noahTALK("CBFLASH","SetMouse",mouseX+","+mouseY);
		isM=false;
	}
	if (evGetMouseXY!="") eval(evGetMouseXY);
	//if (eval("dragMove()")!=null) dragMove(mouseX,mouseY);
	return true;
}
function WinResized()
{
	var x=0,y=0;
	
	if (inDiv==null) inDiv=geID("CBINIT");
	if (inDiv!=null)
	{
		x=GetLeft(inDiv)+PassX;
		y=GetTop(inDiv)+PassY;
		if (x>0 || y>0 && (x!=null & y!=null))
		{
			noahTALK("CBFLASH","MoveSize",x+","+y);
		}
	}
	if (evWinResized!="") eval(evWinResized);
}
function GetEvent(ev)
{
	var s="";
	if (!isUndefined(ev)) s=ev+"";
	
	if (s!="")
	{
		s=s.substring(s.indexOf("{")+1,s.length-2);
		if (s.indexOf("(")<0) s="";
	}
	return(s);
}
function WinReady()
{
	//**INITME
	isLoad=true;
	if (isOK)
	{
		cbSetCookie("tCook",1);
		cOK=cbGetCookie("tCook",false);
		FindDots();
		noahDebug("WinReady/","LOAD",true);
		if (nInit) doInit();
	}
	if (evWinReady!="") eval(evWinReady);
}	
function WinDone()
{
	cbDiv.innerHTML="";
	cmDiv.innerHTML="";
	if (mm>0) clearInterval(mm);
	if (evWinDone!="") eval(evWinDone);	
}
//Quick Calls
function cbSetMenu(mName,ID)
{
	noahTALK("CBFLASH","SetMenu",ID+","+mName);
}	
function LoadSkin(skin)
{
	noahTALK("CBFLASH","LoadSkin",fn);
}
function playNOAHdot(objectID,file2Play,xOff,yOff)
{
	if (isOK && isInit)
	{
		var mx,my;
		var e=null;
		if (file2Play=="" || isUndefined(file2Play)) return;
		if (objectID!="" && !isUndefined(objectID)) e=geID(objectID);	
		if (isUndefined(xOff)) xOff=0;
		if (isUndefined(yOff)) yOff=0;
		if (e!=null)
		{
			mx=GetLeft(e)+Number(xOff);
			my=GetTop(e)+Number(yOff);
		}
		else
		{
			mx=mouseX+Number(xOff);
			my=mouseY+Number(yOff);
		}
		dotX=mx;
		dotY=my;
		cbPlay(file2Play,true);	
	}
}
function isUndefined(v)
{
	if (typeof v=="undefined") return true; else return false;
}
function cbPlay(fn,isDot)
{
	isNOAHdot=isUndefined(isDot)?false:isDot;
	var isD=isNOAHdot?1:0;
	noahTALK("CBFLASH","PlayFile",fn+","+isD);
}	
//Flash JS com
function noahTALK(SPK, CMD, ARGS) 
{	
	var i="";
	if (isInit)
	{
		SPK="_"+SPK;
		noahDebug(CMD+"/"+ARGS,"FC_"+SPK,true);
		cmDiv.innerHTML = "";
		if (Win)
		{
		i=i+'<OBJECT height=10 width=10 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>';
		i=i+'<PARAM NAME="FlashVars" VALUE="spk=' + SPK + CBIDX + '&cmd=w_' + escape(CMD) + '&args=' + escape(ARGS) + '"><PARAM NAME="Movie" VALUE="' + noahLoc + 'FLASHTALK.SWF">';
		}
		i=i+'<embed width=10 height=10 src="' + noahLoc + 'FLASHTALK.SWF" FlashVars="spk=' + SPK + CBIDX + '&cmd=w_' + escape(CMD) + '&args=' + escape(ARGS) + '" type="application/x-shockwave-flash"></embed>';
		if (Win) i=i+"</OBJECT>";
		cmDiv.innerHTML=i;
	}
}
//Cookie functions
function geID(e)
{
	var r=isOpera?document.all[e]:document.getElementById(e)
	return(r);
}
function cbGetCookie(cOption,noExistVal)
{
	var b=document.cookie.indexOf(cOption);
	if (b>=0)
	{
		if (document.cookie.substr(b+cOption.length+1,1)=="1") return true; else return noExistVal;
	}
	else 
	{
		if (isUndefined(noExistVal)) return false; else return noExistVal;
	}
}
function cbCheckFile(fName)
{
	var b=document.cookie.indexOf("CBCookie="),fRet=false,wCook="CBCookie=",fStr="";
	if (b>=0 && useCookies)
	{
		var e=document.cookie.substring(b).indexOf(";");
		if (e==-1) e=document.cookie.length;
		fStr=document.cookie.substring(b+9,e+b);
		if (fStr.indexOf(fName)>=0) fRet=true;
	}
	if (fRet==false && useCookies)
	{
		var expire = new Date();
		var now=new Date();
		if (CookieLength>0) expire.setTime(now.getTime() + 3600000*24*CookieLength); else expire.setTime(now.getTime() + 3600000*24*365);
		wCook=wCook + fStr + "|" + fName;
		wCook=wCook + ";expires="+expire.toGMTString();
		document.cookie = wCook;
	}
	return fRet;
}
function cbSetCookie(c,v)
{
	var expire = new Date();
	var now=new Date();
	expire.setTime(now.getTime() + 3600000*24*365);
	var w=c+"="+v;
	w=w + ";expires="+expire.toGMTString();
	document.cookie = w;
}
//Movement and positioning
function GetWidth(e)
{
	if (e==null) return null;
	var n=isUndefined(e.width)?"":e.style.width==""?e.width:e.style.width;
	if (isNaN(n)) if (n.indexOf("px")>0) n=n.substring(0,n.indexOf("px")); else return n;
	return Number(n);
}
function GetHeight(e)
{
	if (e==null) return null;
	var n=isUndefined(e.height)?"":e.style.height==""?e.height:e.style.height;
	if (isNaN(n)) if (n.indexOf("px")>0) n=n.substring(0,n.indexOf("px")); else return n;
	return Number(n);
}
function GetLeft(e)
{
    if (e==null) return null;
    var pos = e.offsetLeft;
    var ePar = e.offsetParent;
    while (ePar != null)
    {
        pos += ePar.offsetLeft;
        ePar = ePar.offsetParent;
    }
    return pos;
}
function GetTop(e)
{
    if (e==null) return null;	
    var pos = e.offsetTop;
    var ePar = e.offsetParent;
    while (ePar != null)
    {
        pos += ePar.offsetTop;
        ePar = ePar.offsetParent;
    }
    return pos;
}
function isVX(off)
{
	var bl,br,db=document.body;
	if (off<0) off=0;
	bl=(db.offsetLeft+db.scrollLeft);
	br=(db.offsetLeft+db.scrollLeft+db.clientWidth);
	if (off>=bl && off<=br) return true; else return false;
}
function isVY(off)
{
	var bt,bb,db=document.body;
	if (off<0) off=0;
	bt=(db.offsetTop+db.scrollTop);
	bb=(db.offsetTop+db.scrollTop+db.clientHeight);
	if (off>=bt && off<=bb) return true; else return false;
}
function EnsureVisible()
{
	var wx=-.1,wy=-.1,n;
	
	if (autoScroll && !isNOAHdot  && initScroll)
	{
		if(!isVX(curX-avW))
		{
			wx=curX-avW;
			if (wx<0) wx=0;
		}
		if(!isVX(curX+(avW*2)) && wx==-.1) wx=curX+(avW*2);
		if(!isVY(curY-avH)) 
		{
			wy=curY-avH;
			if (wy<1) wy=1;
		}
		n=curY+(avH*2);
		if(!isVY(n) && wy==-.1) wy=curY+(avH*2);
		if (wx!=-.1) window.scrollTo(wx,document.body.scrollTop);
		if (wy!=-.1) window.scrollTo(document.body.scrollLeft,wy);
	}
}
function noahAudioPos(args)
{
}
function noahInitDone(args)
{
	if (!cbGetCookie("cbScroll",true))
	{
		autoScroll=false;
		cbSetMenu("Scroll",1);
	}
	else
	{
		autoScroll=true;
		cbSetMenu("No Scroll",1);
	}
	if (StopOnLoad==3) noahPlayHelp("");
	if (mm>0) clearInterval(mm);
	mm=setInterval("canFollow()",350);
}
function noahVer(args)
{
	if (confirm(args)) window.document.location="http://www.macromedia.com/shockwave/download/triggerpages_mmcom/flash.html";
}
function noahInfo(args)
{
	var lp;
	if (args.indexOf("Last Cmd:")==0)
	{
		args=args + "\nBrowser (";
		if (isOpera)
		{
			args=args + "Opera masking as " + navigator.appName + ")";
		}
		else
		{
			args=args + navigator.appName + ")";
		}
	}
	var ts=args.replace(/__/g,"\n");
	alert(ts);
	if (dLevel>2)
	{
		noahDebug("REVIEW","INFO",false);
	}
}
function noahMoveXY(args,isDirect)
{
	if ((isUndefined(isDirect) || (isDirect && isNOAHdot)) && !isStatic)
	{
		var dta=args.split(",");
		if (cbDiv==null) cbDiv=geID("CB");
		curX=Number(dta[0]);
		cbDiv.style.left=curX;
		curY=Number(dta[1]);
		cbDiv.style.top=curY;
		EnsureVisible();
		if (isDrag) SizeLayer();
		if (IE && !Win) noahTALK("CBFLASH","SetMouse",mouseX+","+mouseY);
	}
}
function noahCMD(command,args)
{
	try
	{
		noahDebug(command + "/" + args,"JS_COMMUNICATION",false);
		eval("noah"+command+"('" + args + "')");
	}
	catch(e)
	{
		var r = "";
		for (var p in e) r+="<BR>"+p+":"+e[p];
      		noahDebug("COMMUNICATION_"+command + "/" + args+r,"ERRORS",true);
	}
}
function CBFLASH_DoFSCommand(command, args)
{
	try
	{
		noahDebug(command + "/" + args,"FS_COMMUNICATION",false);
		eval("noah"+command+"('" + args + "')");
	}
	catch(e)
	{
		var r = "";
		for (var p in e) r+="<BR>"+p+":"+e[p];
      		noahDebug("COMMUNICATION_"+command + "/" + args+r,"ERRORS",true);
	}
}
function noahMENU(cmd)
{
	switch(cmd)
	{
		case "play":
			isNOAHdot=false;
			break;
		case "dock":
			if (allowDock) cbSetCookie("cbDock",1);
			break;
		case "move":
			if (allowDock) cbSetCookie("cbDock",0);
			break;
		case "disable":
			if (allowDisable) cbSetCookie("cbStop",1);
			break;
		case "enable":
			if (allowDisable) cbSetCookie("cbStop",0);
			break;	
		case "No Scroll":
			cbSetCookie("cbScroll",0);
			autoScroll=false;
			cbSetMenu("Scroll",1);
			break;
		case "Scroll":
			cbSetCookie("cbScroll",1);
			autoScroll=true;
			cbSetMenu("No Scroll",1);
			break;
	}
}
//Engine Events
function noahPlayHelp(args)
{
	if (StopOnLoad>0 && StopOnLoad<5) noahSetText("Click on me to take a tour of this page. Make sure your <font color='#0000FF'>sound</font> is on.");
}
function noahMouseClick(args)
{
}
function noahxInfo(args)
{
}
function noahMouseFocus(hasFocus)
{
}
function noahTalking(isTalking)
{
}
function noahGetServer(args)
{
	noahTALK("CBFLASH","GetServer",document.location.href);
}
function noahGetInit(args)
{
	if (isInit)
	{
		var isE=IE && !isOpera?1:0;
		if (cbDiv!=null)
		{
			if (useCookies && (StopOnLoad==0 || StopOnLoad==2)) StopOnLoad=cbCheckFile(SoundFile)?1:StopOnLoad;
			if (!cOK) StopOnLoad=StopOnLoad>3?StopOnLoad:3;
			var P1=useFS;
			var P2=allowDock?Math.abs(cbGetCookie("cbDock",0)):0;
			var P3=allowDisable?Math.abs(cbGetCookie("cbStop",0)):0;
			var P4=Win?1:0;
			noahTALK("CBFLASH","GetInit",P1+","+(InitX)+","+(InitY)+","+StopOnLoad+","+(allowDock?1:0)+","+(allowDisable?1:0)+","+P2+","+P3+","+partnerID+","+SoundFile+","+isE+","+dLevel+","+P4);
		}
	}
}
function noahGETOBJ(args)
{
	var st,n;
	if (args.indexOf("-")>0)
	{
		oName=args.substring(0,args.indexOf("-"));
		var sName=args.substring(args.indexOf("-")+1);
		var e=geID(oName);	
		if (e!=null)
		{
			x=GetLeft(e);
			y=GetTop(e);
		}
		if (sName.indexOf(":")>0)
		{
			x=x+Number(sName.substring(0,sName.indexOf(":")));
			y=y+Number(sName.substring(sName.indexOf(":")+1));
		}
		else
		{
			y=sName.substr(0,1)=="T"?y:sName.substr(0,1)=="C"?y+GetHeight(e)/2:y+GetHeight(e);
			x=sName.substr(1,1)=="L"?x:sName.substr(1,1)=="C"?x+GetWidth(e)/2:x+GetWidth(e);
		}
	}
	else
	{
		oName=args;
		var e=geID(args);	
		if (e!=null)
		{
			x=GetLeft(e);
			y=GetTop(e);
		}
	}
	if (oName=="CBINIT")
	{
		x=x+avW;
		y=y+avH;
	}
	noahTALK("CBFLASH","GETOBJ",x+","+y);
}
function noahTrace(args)
{
	noahDebug(args,"TRACE",true);
}

function noahAvatarSize(args)
{
	var dta=args.split(",");
	avH=Number(dta[0]);
	avW=Number(dta[1]);
	if (dta.length==2)
	{
		zavH=avH;
		zavW=avW;
	}
	cbDiv.style.height=avH;
	cbDiv.style.width=avW;
	noDiv.style.height=avH;
	noDiv.style.width=avW;
	cbObj.style.height=avH;
	cbObj.style.width=avW;
	avH=avH/2;
	avW=avW/2;
	if (dbDiv!=null)
	{
		dbDiv.style.left=avW-90;
	}
}
function noahsInit(args)
{
}

//MP3 Control Events
function noahMP3Stop(args)
{
	var td=isNOAHdot;
	initScroll=false;
	noahMP3Complete();
}
function noahMP3Complete(args)
{
	cleanUp();
	if (isNOAHdot && dotX==-1)
	{
		noahMoveXY((InitX)+","+(InitY),true);
	}
}
function noahMP3Play(args)
{
}
function noahisPlaying(args)
{
	isP=args;
	if (mm>0) clearInterval(mm);
	mm=0;
	if (isP=="0")
	{
		mm=setInterval("canFollow()",250);
	}
}
function noahMP3Start(args)
{
	initScroll=true;
	if (dotX!=-1)
	{
		noahMoveXY(dotX+","+dotY,true);
	}
	dotX=-1;
}
function noahMP3Continue(args)
{
	initScroll=true;
}
function noahMP3Pause(args)
{
	initScroll=false;
}
function noahMP3Restart(args)
{
	initScroll=true;
}
function cleanUp()
{
	clearHighLight();
	noahSetText("");
	HideDots();
}	
function noahZoom(per)
{
	var zh=zavH*(per*.01);
	var zw=zavW*(per*.01);
	noahAvatarSize(zh+','+zw+',per')
}
//text display
function noahSetText(args)
{
	if (dbDiv!=null && showText && !(!Win && IE))
	{
		if (args!="")
		{
			//BackColor,BackAlpha,BorderColor,BorderAlpha,BorderSize
			dbDiv.style.visibility='visible';
			noahTALK("DBFLASH","SetParams","#FFFFFF,95,#000000,90,1");
			noahTALK("DBFLASH","SetText",args);
			if (!Win && isFF) dbDiv.style.top=-85;
		}
		else
		{
			if (!Win && isFF) dbDiv.style.top=-3000;
			dbDiv.style.visibility='hidden';
		}
	}
}
//Size Object
function SizeLayer()
{
	wLay.style.width=(curX+avW-wLayX);
	wLay.style.height=(curY+avH-wLayY);
}
function getInitSize(objID)
{
	wLay=geID(objID);
	if (wLay!=null)
	{
		wLayW=GetWidth(wLay);
		wLayH=GetHeight(wLay);
		wLayX=GetLeft(wLay);
		wLayY=GetTop(wLay);
		isDrag=true;
	}
}
function setInitSize()
{
	if (wLay!=null)
	{
		wLay.style.width=wLayW;
		wLay.style.height=wLayH;
	}
}
//Locate all the NOAHDOTS
function FindDots()
{
	var st,nm=1,ln,cd=1;
	var ele;
	var st;
	jTMR=true;
	nDots[0]="";
	for (var i=0;i<document.images.length;i++)
	{
		st=document.images[i].src.toUpperCase();
		if (st.indexOf("NOAHDOT.GIF")>=0)
		{
			ln=document.images[i].id+"";
			if (ln=="")
			{
				document.images[i].id="A_ND_" + nm;
				nm++;
			}
			nDots[cd]=document.images[i].id;
			document.images[i].border=0;
			document.images[i].style.borderWidth=0;
			if (!isOK) document.images[i].style.visibility="hidden";
			cd++;
		}
	}
}
function ShowDots(clr)
{
	var c,e,x,y,h,w;
	if (!jTMR) FindDots();
	for (c=1;c<nDots.length;c++)
	{
		e=geID(nDots[c]);
		if (e!=null)
		{
			e.border=1;
			e.style.borderWidth=2;
			e.style.borderColor=clr;
		}
	}
}
function HideDots()
{
	var c,e;
	if (jTMR)
	{
		for (c=1;c<nDots.length;c++)
		{
			e=geID(nDots[c]);
			e.border=0;
			e.style.borderWidth=0;
		}
	}
}
//Highlight an object
function HighLightObject(objName,pCol,isFill,xOff,yOff,fWidth,fHeight)
{
	if (isUndefined(pCol) || pCol==null) pCol="#FFFF00";
	if (isUndefined(isFill) || isFill==null || (!Win) || isOpera) isFill="0";
	if (isUndefined(xOff)) xOff=0;
	if (isUndefined(yOff)) yOff=0;
	var e=geID(objName);
	var x,y,h,w,st;
	if (e!=null)
	{
		x=GetLeft(e)-1+Number(xOff);
		y=GetTop(e)-1+Number(yOff);
		if (isUndefined(fWidth))
		{
			h=GetHeight(e)+1-Number(yOff);
			w=GetWidth(e)+1-Number(xOff);
		}
		else
		{
			h=Number(fHeight)+1;
			w=Number(fWidth)+1;
		}
		showHighLight(w,h,x,y,pCol,isFill);
	}
}
function showHighLight(w,h,x,y,bCol,isFill)
{  
	hiDiv.style.width=w;
	hiDiv.style.height=h;
	hiDiv.style.left=x;
	hiDiv.style.top=y;
	hiDiv.style.borderColor=bCol;
	if (isFill=="1")
	{
		hiDiv.style.backgroundColor=bCol;
		hiDiv.style.filter="alpha(opacity=20)";
		hiDiv.style.MozOpacity=.20;
	}
	else
	{
		hiDiv.style.backgroundColor="transparent";
	}
	hiDiv.style.visibility="visible";
}
function clearHighLight()
{
	if (hiDiv!=null) hiDiv.style.visibility="hidden";
}
function noahEXTRA(cmd)
{
	var p=cmd.indexOf("(");
	if (p<0) p=cmd.length; else var dta=cmd.substring(p+1,cmd.indexOf(")")).split(",");
	var cm=cmd.substring(0,p);
	switch(cm.toUpperCase())
	{
		case "STARTDRAG":
			getInitSize(dta[0]);
			break;
		case "STOPDRAG":
			isDrag=false;
			break;
		case "RESETDRAG":
			setInitSize();
			break;
		case "SETLIGHT":
			HighLightObject(dta[0],dta[1],dta[2],dta[3],dta[4],dta[5],dta[6]);
			break;
		case "SHOWDOTS":
			if (isUndefined(dta[0])) dta[0]="#FFFF00";
			ShowDots(dta[0]);
			break;
		case "CLRDOTS":
			HideDots();
			break;
		case "CLRLIGHT":
			clearHighLight();
			break;
		case "SKIN":
			clearHighLight();
			break;
		case "ZOOM":
			noahZoom(dta[0]);
			break;
		default:
			noahCUSTOM(cmd);
			break;
	}
}
function doInit()
{
	var i="";
	if (!isOK || isInit) return;
	isInit=true;
	cmDiv = document.createElement("div");
	cmDiv.id = "NOAHCOMM";
	document.body.appendChild(cmDiv);
	inDiv=geID("CBINIT");
	if (inDiv!=null)
	{
		InitX=GetLeft(inDiv)+PassX;
		InitY=GetTop(inDiv)+PassY;
	}
	else
	{
		InitX=PassX;
		InitY=PassY;
	}
	isStatic=InitX==-1 && InitY==-1?true:false;
	if (isStatic)
	{
		InitX=0;
		InitY=0;
	}
	hiDiv = document.createElement("div");
	hiDiv.id="cbHigh";
	hiDiv.style.position="absolute";
	hiDiv.style.borderWidth="3px";
	hiDiv.style.borderStyle="solid";
	hiDiv.style.zindex=2000;
	hiDiv.style.visibility="hidden";
	document.body.appendChild(hiDiv);
	cbDiv = document.createElement("div");
	cbDiv.id = "CB";
	cbDiv.style.left=InitX;
	cbDiv.style.top=InitY;
	cbDiv.style.height=100;
	cbDiv.style.width=100;
	cbDiv.style.position=isStatic?"relative":"absolute";
	cbDiv.style.visibility="visible";
	cbDiv.style.zindex=2001;
	document.body.appendChild(cbDiv);
	if (showText && !isStatic)
	{
		dbDiv = document.createElement("div");
		dbDiv.id = "DBLay";
		dbDiv.style.left=-40;
		dbDiv.style.top=-85;
		dbDiv.style.height=90;
		dbDiv.style.width=180;
		dbDiv.style.position="absolute";
		dbDiv.style.visibility="hidden";
		dbDiv.style.zindex=2003;
		dbDiv.innerHTML=AddDB();
		cbDiv.appendChild(dbDiv);
		dbObj=Win && IE && !isOpera?geID("DBFLASH"):geID("nDBFLASH");
	}
	noDiv = document.createElement("div");
	noDiv.id = "CBLay";
	noDiv.style.left=0;
	noDiv.style.top=0;
	noDiv.style.height=100;
	noDiv.style.width=100;
	noDiv.style.position="absolute";
	noDiv.style.visibility="visible";
	noDiv.style.zindex=2002;
	noDiv.innerHTML=AddNOAH();
	cbDiv.appendChild(noDiv);
	if (isStatic)
	{
		InitX=GetLeft(cbDiv);
		InitY=GetTop(cbDiv);
	}
	cbObj=Win && IE && !isOpera?geID("CBFLASH"):cbObj=geID("nCBFLASH");
	if (Win && IE && !isOpera) cbObj.attachEvent("FSCommand",eval("CBFLASH_DoFSCommand"));
	noahDebug("doInit/"+InitX+","+InitY,"LOAD",true);
}
function AddDB()
{
	var i="";
	if (Win)
	{
	i=i+'<OBJECT id=DBFLASH height=90 width=180 style="height:90;width:180;" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>';
	i=i+'<PARAM NAME="FlashVars" VALUE="talkIDX=' + CBIDX + '"><PARAM NAME="Movie" VALUE="' + noahLoc + 'MENTORD.SWF">';
	i=i+'<PARAM NAME="WMode" VALUE="Transparent"><PARAM NAME="SAlign" VALUE="LT">';
	i=i+'<PARAM NAME="Menu" VALUE="0"><PARAM NAME="Scale" VALUE="NoScale">';
	}
	i=i+'<embed style="height 90;width 180;" width=180 height=90 src="' + noahLoc + 'MENTORD.SWF" id=nDBFLASH NAME=DBFLASH FlashVars="talkIDX=' + CBIDX + '" scale=noScale salign=LT';
	i=i+' wmode=transparent swLiveConnect=true type="application/x-shockwave-flash"></embed>';
	if (Win) i=i+'</OBJECT>';
	return (i);
}	
function AddNOAH()
{
	var i="";
	if (Win)
	{
	i=i+'<OBJECT id=CBFLASH height=10 width=10 style="height:10;width:10;" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>';
	i=i+'<PARAM NAME="FlashVars" VALUE="CBSkin=' + cbSkin + '&useFS=' + useFS + '&talkIDX=' + CBIDX + '"><PARAM NAME="Movie" VALUE="' + noahLoc + 'NOAHENGINE.SWF">';
	i=i+'<PARAM NAME="WMode" VALUE="Transparent"><PARAM NAME="SAlign" VALUE="LT">';
	i=i+'<PARAM NAME="Menu" VALUE="0"><PARAM NAME="Scale" VALUE="NoScale">';
	}
	i=i+'<EMBED id=nCBFLASH name=CBFLASH width=10 height=10 src="' + noahLoc + 'NOAHENGINE.SWF"  FlashVars="CBSkin=' + cbSkin + '&useFS=' + useFS + '&talkIDX=' + CBIDX + '" scale=noScale salign=LT wmode=transparent menu=0 swLiveConnect=true type="application/x-shockwave-flash" style="height 1;width 1;"></EMBED>';
	if (Win) i=i+'</OBJECT>';
	return (i);
}	
function InitNOAH(sfile,sx,sy,skin,stp,ck,cl,p)
{
	if (nInit) 
	{
		if (dLevel>0) alert("NOAH already initialized");
		return;
	}
	if (!isUndefined(sx) && !isNaN(sx)) PassX=Number(sx);
	if (!isUndefined(sy) && !isNaN(sy)) PassY=Number(sy);
	if (!isUndefined(skin)) cbSkin=skin;
	if (!isUndefined(stp) && !isNaN(stp)) StopOnLoad=Number(stp);
	if (!isUndefined(ck)) useCookies=ck;
	if (!isUndefined(cl)) CookieLength=cl;
	if (!isUndefined(sfile)) SoundFile=sfile;
	if (!isUndefined(p)) partnerID=p;
	if (isLoad && !isInit) doInit();
	nInit=true;
	noahDebug("InitNOAH/"+PassX+","+PassY+","+SoundFile+","+cbSkin,"LOAD",true);
}
function InitURL()
{
	var rp=document.location.toString().toUpperCase();
	var p=rp.indexOf("://");
	var rp=rp.substring(p+3);
	var loc=rp.substr(0,rp.indexOf("/"));
	if (loc.substr(0,4)=="WWW.") loc=loc.substring(4);
	
	var page=rp.substring(rp.indexOf("/"));
	var x=page.indexOf("?");
	var qry="";
	//**DOMCOMP
	if (x>0) 
	{
		qry=page.substring(x);
		page=page.substring(0,x);
	}
	var isDef=page.substr(page.length-1,1)=="/"?1:0;
	//**URLCOND
}
//Debug
if (dLevel!=0) document.write('<SCRIPT language="javascript" type="text/javascript" src="' + noahLoc + 'CBDEBUG.JS"></SCRIPT>');
function noahDebug(s,t,a)
{
	if (dLevel!=0 && s!="")
	{
		try
		{
			i_noahDebug(s,t,a);
		}
		catch(er)
		{
		}	
	}
}
document.write('<SCRIPT language="javascript" type="text/javascript" src="' + noahLoc + 'CBCUSTOM.JS"></SCRIPT>');
function noahCUSTOM(cmd)
{
	var p=cmd.indexOf("("),c,args="";
	if (p<0) 
	{
		p=cmd.length;
	}
	else 
	{
		var dta=cmd.substring(p+1,cmd.indexOf(")")).split(",");
		for (c=0;c<dta.length;c++)
		{
			if (c>0) args=args+",";
			args=args+dta[c];
		}
	}
	var cm=cmd.substring(0,p);
	try
	{
		eval(cm+"("+args+");");
	}
	catch(er)
	{
		 if (dLevel>0) alert("Error evaluating custom function " + cm+"("+args+")");
	}
}
