
/* Global Window Events
=================================================*/	
if (!GLOBAL_EVENTS){
	var GLOBAL_EVENTS={
		$onload:new Array(),
		$onresize:new Array(),
		onloadExecute:function(){
			var eData=this.eData
			for (var fNum=0;fNum<eData.$onload.length;fNum++){
					var fName=eData.$onload[fNum]
					$function(fName)				
				}
					
			},
		onresizeExecute:function(){
			var eData=this.eData
			for (var fNum=0;fNum<eData.$onresize.length;fNum++){
					var fName=eData.$onresize[fNum]
					$function(fName)
				}
					
			},
			
		append:function(eventType,fName){
			if (!eventType || !this["$"+eventType]) return false
			//alert (eventType+" "+fName)
			this["$"+eventType].push(fName)
			return false
			},
		ready:function(){
	
			window.eData=this
			window.onresize=this.onresizeExecute
			window.onload=this.onloadExecute
			
			
	//		var o=''
	//		for (var e in window) if (e=='onload') o+=e+="->"+window[e]+" "
	//		alert (o)
			}	
	}
	GLOBAL_EVENTS.ready()
	}

function doScript(scriptSRC,params)
{
	var newScript = document.createElement("SCRIPT"), paramsString="";
//	if (!params) var params={};
	
	params.from="js";
		for (p in params) {paramsString+=paramsString?"&"+p+"="+params[p]:"?"+p+"="+params[p]}
	scriptSRC+=paramsString;
	//alert (scriptSRC); return;
	newScript.type="text/javascript";
	newScript.src=scriptSRC;   
//	alert (scriptSRC);
	document.body.appendChild(newScript);
}

function $id(el)
{	
	var res;
	if (!el) return false;
	res=null;
	if (typeof(el)!="object")
	{
		if (document.getElementById(el)) res=document.getElementById(el);
	} else res=el;
	
	return res;
}

function $name(el)
{	
	if (!el) return false;
	var els=new Array();

	if (typeof(el)!="object")
	{
		els=document.getElementsByName(el);
	} 
	
	if (els.length!=0) return els;
	else return null;
}


function $tagname(tg,par)
{	
	if (!tg) return false;
	var els=new Array();

	if (par && typeof(par)=="object") els=par.getElementsByTagName(tg);
	else els=document.getElementsByTagName(tg);
	
	if (els.length!=0) return els;
	else return null;
}

function $value(el)
{
	var res
	el=$id(el)
	if (!el) return false
	
	res=el.value?el.value:null
	return res
	
}

function $function(fName,params)
{
	var res=null
	if (fName) 
	{
		eval('res='+fName+'(params)')
	}
	return res
}

function NtoBR(strToClear)
{

	nIndex=strToClear.indexOf('\n');
//	alert (nIndex);
	while (nIndex>0)
	{
		leftPart=strToClear.substr(0,nIndex);
		rightPart=strToClear.substr(nIndex+1, strToClear.length-1);
		strToClear=leftPart+"<BR>"+rightPart;
		nIndex=strToClear.indexOf("\n");
	}

	nIndex=strToClear.indexOf('\r');
//	alert (nIndex);
	while (nIndex>0)
	{
		leftPart=strToClear.substr(0,nIndex);
		rightPart=strToClear.substr(nIndex+1, strToClear.length-1);
		strToClear=leftPart+rightPart;
		nIndex=strToClear.indexOf("\r");
	}
	
//alert (strToClear);
	return strToClear;
}

function BRtoN(strToClear)
{

	nIndex=strToClear.indexOf('<BR>');
//	alert (strLength);
	while (nIndex>0)
	{
		leftPart=strToClear.substr(0,nIndex);
		rightPart=strToClear.substr(nIndex+4, strToClear.length-1);
		strToClear=leftPart+'\n'+rightPart;
		nIndex=strToClear.indexOf("<BR>");
	}
	
	nIndex=strToClear.indexOf('<br>');
	while (nIndex>0)
	{
		leftPart=strToClear.substr(0,nIndex);
		rightPart=strToClear.substr(nIndex+4, strToClear.length-1);
		strToClear=leftPart+'\n'+rightPart;
		nIndex=strToClear.indexOf("<br>");
	}
	
	
	return strToClear;
}

function htmlspecialchars(text){

		while (text.indexOf('<')>=0) text=text.replace(/</,'[lt]')
		while (text.indexOf('>')>=0) text=text.replace(/>/,'[gt]')
		return text
	}


function setChild(par,elID,elClass,elType,elContent)
{
	if (!par && !elID) return false;
	
	var el=$id(elID);
	
	if (par && !el && elType) 
	{
		//need to create and append new child
		par=$id(par);		
		el=document.createElement(elType);
		el=par.appendChild(el);
		if (elID) el.id=elID;
	}
	
	if (!el) return false;
	
	if (elClass) el.className=elClass;
	if (elContent) el.innerHTML=elContent;
	
	return el;
}
function unsetChild(el,par){
	if (!par) par=el.parentNode
	var res=null
	if ($id(el))
		par.removeChild($id(el))
	return res
	}

function getElementByTagAndClass(par,elTag,elClass)
{
	if (!par || !elTag) return false;

	par=$id(par);
	var el,elNum,els=new Array(),res=null;
	els=par.getElementsByTagName(elTag);
	if (els.length>0)
	{
		for (elNum in els) {
			el=els[elNum];
			if (el.className && el.className==elClass) res=el;
		}
	}
	
	return res;
}

function getElementsByTagAndClass(par,elTag,elClass){
	if (!par || !elTag) return false;

	par=$id(par);
	var el,elNum,els=new Array(),res=new Array();
	els=par.getElementsByTagName(elTag);
	if (els.length>0)
	{
		for (elNum in els) {
			el=els[elNum];
			if (el.className && (el.className==elClass || el.className.search(elClass)>=0)) res.push(el);
		}
	}
	
	return res;
	}
	
	function toggleClass(el,state,states){
		var states=states?states:['hidden','showed']
		el=$id(el)
		var searchTmpl='/'+states[0]+'/'
		newState=(state==null)?((el.className.search(states[0])>-1)?1:0):state
		
		currState=(newState==0)?1:0
		if (el.className!=null && el.className.search(states[currState])>-1){
			el.className=el.className.replace(states[currState], states[newState])
			}
		else 
			if (el.className!=null && el.className.search(states[newState])<0)
				el.className+=" "+states[newState]
		}

function putAndSendForm(fAction,fMethod,fData,fFiles)
{
	var f=setChild(document.body,null,null,"form"),i;
	if (fAction) f.action=fAction;
	if (fMethod) f.method=fMethod;
	for (var iName in fData)
	{ 
		i=setChild(f,null,null,"input")
		//i.setProperty("type","hidden");
		i.name=iName
		i.value=fData[iName]
	}
	
	if (fFiles)
	{
		for (var fName in fFiles)
		{
			var ff=fFiles[fName], newff=f.appendChild(ff);
			// for (var pr in ff) newff[pr]=ff[pr]
			newff.value=ff.value;
			
			//alert(i.value);
		}
		i=setChild(f,null,null,"input")
		i.name="MAX_FILE_SIZE"
		i.value=30000
		f.enctype="multipart/form-data";
	}
	

	f.submit();
}

function getWhereIs(block)
{
	var blockLeft = 0;
    var blockTop = 0;
        while(block) {
        	blockLeft += block.offsetLeft;
            blockTop += block.offsetTop;
            block = block.offsetParent;
        }
        return { left:blockLeft, top:blockTop }
}

//Array prototypes
function in_array(arr,el)
{
	var res=0
	for (elNum in arr) if (el==arr[elNum]) res++
	return res
}



function getRadioValue(el){
	var res=null
	for (var i=0; i<el.length; i++){
		var iEl=el[i]
		if (iEl.checked) {
			res=iEl.value;
			break
				
			}
		}
	return res
	}
	
	
function toggleRow(el,state){
		el=$id(el)
		if (!el) return false
		var stateShow=(document.all && !window.opera)?'block':'table-row',
			states=['none',stateShow],
			state=(state && states[state])?states[state]:((!el.style.display || el.style.display=='none')?states[1]:states[0])
		el.style.display=state
		//alert (el.style.display)
		return false

		}

function setPosition(el,x,y,w,h){
		el=$id(el)
		if (!el) return false
		
		if (x!=null) el.style.left=x+"px"
		if (y!=null) el.style.top=y+"px"
		if (w!=null) el.style.width=w+"px"
		if (h!=null) el.style.height=h+"px"
		
		return false
		}

function putInScreenCenter(el,setX){
		
		var winH = (window.opera)? window.innerHeight:document.documentElement.clientHeight,
			winY=(document.all)?document.documentElement.scrollTop:window.pageYOffset,
			elY=Math.round(winY+winH/2-el.clientHeight/2),
			winW=document.documentElement.offsetWidth,
			elX=setX?Math.round(winW/2-el.offsetWidth/2):null

			if (document.all) elY-=30
			//if (document.all) coreX-=30

			setPosition(el,elX,elY)
		}
function buildFlash(src,width,height,version,name,params,isWrite){
	if (!version) version=7
	if (!width) width='100%'
	if (!height) height='100%'
	if (!name) name='flashmovie'
	if (params) src+='?'+params
	var o='<'+'object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0" width="'+width+'" height="'+height+'" id="'+name+'"><'+'param name="movie" value="'+src+'"><'+'param name="wmode" value="transparent" /><'+'param name="quality" value="high"><'+'param name="allowScriptAccess" value="always" /><'+'embed src="'+src+'" quality="high" wmode="transparent" width="'+width+'" height="'+height+'" name="'+name+'" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"/><'+'/object>'
	if (isWrite) document.write(o)
	return o
	}
	

	
/* Drag
=================================================*/
var isMSIE = document.attachEvent != null;
var isGecko = !document.attachEvent && document.addEventListener;

var DraggingItem = new Object();

function startDrag (event, _this, _targetBlock)
{
	DraggingItem.This = _this;
	DraggingItem.Target= document.getElementById(_targetBlock);
	DraggingItem.TargetXY=getWhereIs(DraggingItem.Target);
	//alert (DraggingItem.TargetX.left);
	//alert (DraggingItem.Target);

	var position = new Object();
	if (isMSIE)
	{
		
		position.x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
		position.y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	}
	if (isGecko)
	{
		
		position.x = event.clientX + window.scrollX;
		position.y = event.clientY + window.scrollY;
	}

	DraggingItem.cursorStartX = position.x;
	DraggingItem.cursorStartY = position.y;
	//alert (DraggingItem.cursorStartX);
	DraggingItem.StartLeft = parseInt (DraggingItem.Target.style.left);
	DraggingItem.StartTop = parseInt (DraggingItem.Target.style.top);

	//alert (DraggingItem.Target.style.top);
	if (isNaN (DraggingItem.StartLeft)) {DraggingItem.StartLeft = DraggingItem.TargetXY.left }
	if (isNaN (DraggingItem.StartTop)) DraggingItem.StartTop = DraggingItem.TargetXY.top;

	if (isMSIE)
	{
		document.attachEvent ("onmousemove", ProceedDrag);
		document.attachEvent ("onmouseup", StopDrag);
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	}
	if (isGecko)
	{
		document.addEventListener ("mousemove", ProceedDrag, true);
		document.addEventListener ("mouseup", StopDrag, true);
		event.preventDefault();
	}
}

function ProceedDrag (event)
{
	var position = new Object();

	if (isMSIE) {
		position.x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
		position.y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
	}
	if (isGecko)
	{

		position.x = event.clientX + window.scrollX;
		position.y = event.clientY + window.scrollY;
	}	

	var nextX = DraggingItem.StartLeft + position.x - DraggingItem.cursorStartX;
	if (nextX < -150) nextX = -150;
	DraggingItem.Target.style.left = nextX + "px";

	var nextY = DraggingItem.StartTop  + position.y - DraggingItem.cursorStartY;
	//if (nextY > 600) nextY = 600;
	DraggingItem.Target.style.top = nextY + "px";

	if (isMSIE)
	{
		window.event.cancelBubble = true;
		window.event.returnValue = false;
	}
	if (isGecko) event.preventDefault();
}

function StopDrag (event)
{	
	if (isMSIE)
	{
		document.detachEvent ("onmousemove", ProceedDrag);
		document.detachEvent ("onmouseup", StopDrag);
	}
	if (isGecko)
	{
		document.removeEventListener ("mousemove", ProceedDrag, true);
		document.removeEventListener ("mouseup", StopDrag, true);
	}

	//if (DraggingItem.AfterAction) DraggingItem.AfterAction (DraggingItem.This);

	//SaveDesktop();
}


/* Flash Checking
=================================================*/
var flashChecking={
	isIE:(navigator.appVersion.indexOf("MSIE") != -1) ? true : false,
	isWin:(navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false,
	isOpera:(navigator.userAgent.indexOf("Opera") != -1) ? true : false,
	ControlVersion:function(){
		var version;
		var axo;
		var e;
	
		// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
	
		try {
			// version will be set for 7.X or greater players
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	
		if (!version)
		{
			try {
				// version will be set for 6.X players only
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				
				// installed player is some revision of 6.0
				// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
				// so we have to be careful. 
				
				// default to the first public version
				version = "WIN 6,0,21,0";
	
				// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
				axo.AllowScriptAccess = "always";
	
				// safe to call for 6.0r47 or greater
				version = axo.GetVariable("$version");
	
			} catch (e) {
			}
		}
	
		if (!version)
		{
			try {
				// version will be set for 4.X or 5.X player
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				version = axo.GetVariable("$version");
			} catch (e) {
			}
		}
	
		if (!version)
		{
			try {
				// version will be set for 3.X player
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				version = "WIN 3,0,18,0";
			} catch (e) {
			}
		}
	
		if (!version)
		{
			try {
				// version will be set for 2.X player
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				version = "WIN 2,0,0,11";
			} catch (e) {
				version = -1;
			}
		}
		
		return version;
		},
	GetSwfVer:function(){
			// NS/Opera version >= 3 check for Flash plugin in plugin array
			var flashVer = -1;
			
			if (navigator.plugins != null && navigator.plugins.length > 0) {
				if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
					var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
					var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
					var descArray = flashDescription.split(" ");
					var tempArrayMajor = descArray[2].split(".");			
					var versionMajor = tempArrayMajor[0];
					var versionMinor = tempArrayMajor[1];
					var versionRevision = descArray[3];
					if (versionRevision == "") {
						versionRevision = descArray[4];
					}
					if (versionRevision[0] == "d") {
						versionRevision = versionRevision.substring(1);
					} else if (versionRevision[0] == "r") {
						versionRevision = versionRevision.substring(1);
						if (versionRevision.indexOf("d") > 0) {
							versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
						}
					}
					var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
				}
			}
			// MSN/WebTV 2.6 supports Flash 4
			else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
			// WebTV 2.5 supports Flash 3
			else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
			// older WebTV supports Flash 2
			else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
			else if ( this.isIE && this.isWin && !this.isOpera ) {
				flashVer = this.ControlVersion();
			}	
			return flashVer;
		},
	 DetectFlashVer:function(reqMajorVer, reqMinorVer, reqRevision){
			versionStr = this.GetSwfVer();
			if (versionStr == -1 ) {
				return false;
			} else if (versionStr != 0) {
				if(this.isIE && this.isWin && !this.isOpera) {
					// Given "WIN 2,0,0,11"
					tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
					tempString        = tempArray[1];			// "2,0,0,11"
					versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
				} else {
					versionArray      = versionStr.split(".");
				}
				var versionMajor      = versionArray[0];
				var versionMinor      = versionArray[1];
				var versionRevision   = versionArray[2];
		
					// is the major.revision >= requested major.revision AND the minor version >= requested minor
				if (versionMajor > parseFloat(reqMajorVer)) {
					return true;
				} else if (versionMajor == parseFloat(reqMajorVer)) {
					if (versionMinor > parseFloat(reqMinorVer))
						return true;
					else if (versionMinor == parseFloat(reqMinorVer)) {
						if (versionRevision >= parseFloat(reqRevision))
							return true;
					}
				}
				return false;
			}
		}
	}



GLOBAL_EVENTS.append("onload","mouse2008Init")
//window.onload=mouse2008Init
var M2008,
	MOUSE_2008_SRC="mouse.swf",
	MOUSE_2008_WIDTH=200,
	MOUSE_2008_HEIGHT=300,
	
	MOUSE_CONTAINER_Y_MIN=200,
	MOUSE_CONTAINER_Y_DESPERSION=400,
	
	MOUSE_CONTAINER_Y_MIN_DIAGONAL=500,
	MOUSE_CONTAINER_Y_DESPERSION_DIAGONAL=100,
	
	MOUSE_2008_UPDATE_INTERVAL=2,
	MOUSE_2008_DEFAULT_STEP_DIRECTION=-1,
	MOUSE_2008_DEFAULT_STEP_X=5,
	FLASH_VER_LT_8=!flashChecking.DetectFlashVer(8),
	FLASH_VER_LT_6=!flashChecking.DetectFlashVer(6);
//if (FLASH_VER_LT_8)	MOUSE_2008_DEFAULT_STEP_X=MOUSE_2008_DEFAULT_STEP_X*1.2;


var MOUSE_2008_FASTER_STEP_X=MOUSE_2008_DEFAULT_STEP_X*2.5;
/* if (!document.all && FLASH_VER_LT_8)
	MOUSE_2008_FASTER_STEP_X=MOUSE_2008_FASTER_STEP_X*1 */
	
	var MOUSE_2008_DEFAULT_STEP_Y=MOUSE_2008_DEFAULT_STEP_X,
		MOUSE_2008_FASTER_STEP_X_DIAGONAL=MOUSE_2008_FASTER_STEP_X/2,
		MOUSE_2008_FASTER_STEP_Y=MOUSE_2008_FASTER_STEP_X_DIAGONAL;
function MouseContainerControl(todo){
	//alert ("behavior: "+todo);
	if (M2008[todo] && typeof M2008[todo]=="function"){
		var method=M2008[todo];	
		method.call(M2008)
		this.behavior=todo;
		}
	}


function mouse2008Init(){
	if (FLASH_VER_LT_6) return false;
	var isGecko = !document.attachEvent && document.addEventListener,
		isLinux=navigator && navigator.platform && navigator.platform.search('Linux')>=0;
	if (isLinux)
		return false;
	M2008=new Mouse2008
	M2008.build()

	}



function Mouse2008(){
	
	this.construct=function(){
		this.regime=Math.round(Math.random()+1);//1-horizontal,2-diagonal;
		
		this.flashSrc=MOUSE_2008_SRC;
		this.containerX=0;
		
		this.containerY=(this.regime==2)?
				Math.random()*MOUSE_CONTAINER_Y_DESPERSION_DIAGONAL+MOUSE_CONTAINER_Y_MIN_DIAGONAL:
				Math.random()*MOUSE_CONTAINER_Y_DESPERSION+MOUSE_CONTAINER_Y_MIN;
		this.containerWidth=MOUSE_2008_WIDTH;
		this.containerHeight=MOUSE_2008_HEIGHT;
		
		this.containerXDelta=0;
		this.containerYDelta=0;		
		
		
		
		this.containerXTarget=null;
		this.afterMoving=null;
		
		this.stepDirection=MOUSE_2008_DEFAULT_STEP_DIRECTION;
		this.stepX=MOUSE_2008_DEFAULT_STEP_X;
		this.stepY=(this.regime==2)?this.stepX:0;
		
		
		this.behavior="";
		}
		
	this.build=function(){
		
		this.flashHTML=buildFlashExt(this.flashSrc,"100%","100%",7,"mouse2008swf",null,"regime="+this.regime);

		this.container=setChild(document.body,"mouse2008-container","","DIV")
		this.flashBlock=setChild(this.container,"mouse2008","","DIV")
		var //winW=document.documentElement.offsetWidth,
			winW=document.body.clientWidth,
			//winH=(window.opera)? window.innerHeight:document.documentElement.clientHeight,
			winH=document.body.clientHeight,
			winY=(document.all)?document.documentElement.scrollTop:window.pageYOffset;			
		//alert(winH+" "+document.body.clientHeight)
		if (this.containerY>(winH-this.containerHeight)) this.containerY=winH-this.containerHeight;
		this.containerX=winW-this.containerWidth;
		this.flashBlock.innerHTML=this.flashHTML
		setPosition(this.flashBlock,0,0,MOUSE_2008_WIDTH,MOUSE_2008_HEIGHT);
		this.interval=window.setInterval("M2008.place()",MOUSE_2008_UPDATE_INTERVAL)
		}		
	this.place=function(){
		if (
			(this.containerXTarget && Math.abs(this.containerX-this.containerXTarget)<=Math.abs(this.containerXDelta))
			||
			(this.containerYTarget && Math.abs(this.containerY-this.containerYTarget)<=Math.abs(this.containerYDelta))
			){
			//Stop moving
			this.containerXDelta=0;
			this.containerYDelta=0;
			if (this.afterMoving){
				this.afterMoving.call(this);
				this.afterMoving=null;
				}
			return;
			}
		this.containerX+=this.containerXDelta;
		this.containerY+=this.containerYDelta;		
		setPosition(this.container,this.containerX,this.containerY,this.containerWidth,this.containerHeight);		
		}
		
	this.convertValues=function(){
		var values=[this.containerXDelta,this.containerXTarget]
		for (var i in values){
			var value=values[i];
			if (typeof(value)=="object") continue;

			}
		}
		
		
	//Behaviors:
	
		this.startWalk=function(){		
			this.containerXDelta=this.stepDirection*this.stepX;
			this.containerYDelta=this.stepDirection*this.stepY;
			return false;
			}
		this.sit=function(){
			this.containerXDelta=0;
			this.containerYDelta=0;
			}
		this.wake=function(){
			this.containerXDelta=this.stepDirection*this.stepX;
			this.containerYDelta=this.stepDirection*this.stepY;
			}
		this.runAway=function(){
			this.containerXDelta=this.stepDirection*this.stepX;
			this.containerYDelta=this.stepDirection*this.stepY;
			this.containerXTarget=-this.containerWidth;
			if (this.regime==2)
				this.containerYTarget=-this.containerHeight;
			this.afterMoving=this.kill;
			return false;
			}
		this.getFaster=function(){
			this.stepX=(this.regime==2)?MOUSE_2008_FASTER_STEP_X_DIAGONAL:MOUSE_2008_FASTER_STEP_X;
			this.stepY=(this.regime==2)?MOUSE_2008_FASTER_STEP_Y:0;
			if (this.containerXDelta)
				this.containerXDelta=this.stepDirection*this.stepX;
			if (this.containerYDelta)
				this.containerYDelta=this.stepDirection*this.stepY;
			}
			
	//Kill:
		this.kill=function(){
			this.interval=window.clearInterval(this.interval);
			unsetChild(this.flashBlock)
			unsetChild(this.container)			
			M2008=null;
			return false;
			}
		
	this.construct();	
	}


	


/* Build Flash Extension
=================================================*/
function buildFlashExt(src,width,height,version,name,wmode,params,isWrite){
	if (!version) version=7
	if (!width) width='100%'
	if (!height) height='100%'
	if (!name) name='flashmovie'
	if (!wmode) wmode='transparent'
	if (params) src+='?'+params
	var o='<'+'object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0" width="'+width+'" height="'+height+'" id="'+name+'"><'+'param name="movie" value="'+src+'"><'+'param name="wmode" value="'+wmode+'" /><'+'param name="quality" value="high"><'+'param name="allowScriptAccess" value="always" /><param name="menu" value="false" /><'+'embed src="'+src+'" quality="high" wmode="'+wmode+'" width="'+width+'" height="'+height+'" name="'+name+'" menu="false" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"/><'+'/object>'
	if (isWrite) document.write(o)
	return o
	}
	

