function movesmooth(movesmoothobj,fx,fy,tx,ty,speed){
if (!movesmoothobj) return;
if (movesmoothobj.closeit) {moveidto(movesmoothobj,0,-1000);return; }
mx=(tx+fx)/2;
my=(ty+fy)/2;
mx-=(Math.floor(Math.random()*(fx-mx)) );
my-=(Math.floor(Math.random()*(fy-my)) );
moveidto(movesmoothobj,mx,my);
 if (Math.abs(fx-tx)<0.3 && Math.abs(fy-ty)<0.3) {moveidto(movesmoothobj,tx,ty); return; }
setTimeout("movesmooth(getid(\""+movesmoothobj.id+"\"),"+mx+","+my+","+tx+","+ty+","+speed+")",speed);
}
function addDiv(divId,divTop,divLeft,divZIndex,divPos) {
divObj = document.createElement("div");
divObj.style.zIndex=divZIndex ;
divObj.style.left=divLeft+"px" ;
divObj.style.top=divTop+"px" ;
divObj.style.position=divPos;
divObj.id =divId;
document.body.appendChild(divObj);
}
function addImgTo(divId,imgId,imgSource,imgTop,imgLeft,imgZIndex,imgPos,loadFactor) {
 if (imgSource!="images/loadingdot.gif") {
imgObj = document.createElement("img");
imgObj.src= imgSource;
if (!ie4 && !ie5) imgObj.addEventListener("load", function(){lit(loadFactor);} ,false);
 else  imgObj.onload=function(){lit(loadFactor);}
if (imgZIndex!=0) imgObj.style.zIndex=imgZIndex ;if (imgLeft!=0) imgObj.style.left=imgLeft+"px" ;if (imgTop!=0) imgObj.style.top=imgTop+"px" ;
imgObj.style.position=imgPos;
if (imgId!="") imgObj.id =imgId;
getid(divId).appendChild(imgObj);
  } 
}
function getid(id){
if(ns4) return document.layers[id];
else if(ie4) return document.all[id];
else return document.getElementById(id);
}
function moveidto(id,x,y){
if(ns4)id.moveTo(x,y);
else{
id.style.left=x+'px';
id.style.top=y+'px';
}}
function logit(tct){
if (debug==1) getid("mylog").innerHTML= tct;
}

function changeOpac(opacity, theid) {
    var objectsty =theid.style;
    objectsty.opacity = (opacity / 100);
    objectsty.MozOpacity = (opacity / 100);
    objectsty.KhtmlOpacity = (opacity / 100);
	if (ie4 || ie5 ) {  
	objectsty.width="100%";
	objectsty.height="100%";
	}
    objectsty.filter = "alpha(opacity=" + opacity + ")";
}

function movesspeedbaseY(obj,srcX,srcY,desX,desY,theSpeed,theSteps,removeit){
if (ergentStopObj==obj) {ergentStopObj=null;return;}
if (Math.abs(desY-srcY)<0.01) { moveidto(obj,desX,desY);  screenID.ismoving=false; return; }
theY=((desY-srcY)/theSteps)+srcY;
if (removeit )  { if (typeof obj.opc=="undefined")  obj.opc=100;  obj.opc--; if (!ie4 && !ie5) changeOpac(obj.opc,obj);if (obj.opc==0) {screenID.removeChild(obj);return;}}
theX=((desX-srcX)/ (desY-srcY))*(theY-srcY)  +srcX;
moveidto(obj,theX,theY);
setTimeout("movesspeedbaseY(getid(\""+obj.id+"\"),"+theX+","+theY+","+desX+","+desY+","+theSpeed+","+theSteps+(removeit?",1":"")+")",theSpeed);
}

function cloneObject(what) {
    for (i in what) {
        if (typeof what[i] == 'object') {
            this[i] = new cloneObject(what[i]);
        }
        else
            this[i] = what[i];
    }
}
function cloneArray(what) {
    for (i in what) {
        if (typeof what[i] == 'object') {
            this[i] = new cloneObject(what[i]);
        }
        else
            this[i] = what[i];
    }
}
function srcPng(imgobj,imgsrc){
if (ie4 || ie5 ) { 
imgobj.src="images/dot.gif";
imgobj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgsrc+"', sizingMethod='scale')";
}else {
imgobj.src=imgsrc;
}
}
function getSizeVal(sttrriinngg)
{
return Math.round(sttrriinngg.substring(0,sttrriinngg.length-2));
}
function voidfunction(){}

