//Copyright 2004 by C.MICHELI & S.BOYART//This stuff is a part of netvideo Studio 2.0//(need a DOM compatible web browser)//Have Fun !function TrimString(sInString) {	if(sInString!=null){    sInString = sInString.replace( /^\s+/g, "" );    return sInString.replace( /\s+$/g, "" );	}}function changestyle(obj,stylestring){    params=stylestring.split(";");    var theval="";    for (var i = 0; i < params.length; i++) {        couple=params[i].split(":");        if(couple.length<=2){            theval=couple[1];        }        else{            theval="";            for(k=1;k<couple.length;k++){                theval+=couple[k]+":";            }            theval=theval.substring(0,theval.length-1);	        }		         theval=TrimString(theval);        switch(TrimString(couple[0])){            case "FILTER":;case "filter":                eval("obj.style.filter"+"='"+theval+"'");                break;            case "COLOR":;case "color":                eval("obj.style.color"+"='"+theval+"'");                break;            case "BORDER":;case "border":;case "BORDER-RIGHT":;case "border-right":                eval("obj.style.border"+"='"+theval+"'");                break;            case "BACKGROUND-COLOR":;case "background-color":                eval("obj.style.background"+"='"+theval+"'");                break;        }    }}function initobj(obj){      var havestyleroll=false;    var haveimgroll=false;    var imgOriginSrc;    var imgTemp;     var oldstyle="";    if(obj.tagName=='DIV'|| obj.tagName=='IMG'){        if(document.all) oldstyle=obj.getAttribute('style').cssText;        else oldstyle=obj.getAttribute('style');        obj.oldstyle=oldstyle;        if (obj.getAttribute('StudioStyle')) {            obj.newstyle=obj.getAttribute('StudioStyle');            havestyleroll=true;        }        if (obj.getAttribute('StudioRoll')) {            imgTemp = new Image();            imgTemp.src = obj.getAttribute('StudioRoll');            haveimgroll=true;        }                    if(haveimgroll&&!havestyleroll){            obj.onmouseover = function() {                imgOriginSrc = this.getAttribute('src');                this.setAttribute('src',this.getAttribute('StudioRoll'));            }            obj.onmouseout = function() {                this.setAttribute('src',imgOriginSrc)            }        }        if(!haveimgroll&&havestyleroll){            obj.onmouseover=function(){                changestyle(this,this.newstyle);            }            obj.onmouseout=function(){                changestyle(this,this.oldstyle);            }        }        if(haveimgroll&&havestyleroll){            obj.onmouseover=function(){                imgOriginSrc = this.getAttribute('src');                this.setAttribute('src',this.getAttribute('StudioRoll'));                changestyle(this,this.newstyle);            }            obj.onmouseout=function(){                this.setAttribute('src',imgOriginSrc)                changestyle(this,this.oldstyle);            }        }    }}function go(n){    var numtags = 0;      if (n.nodeType == 1){         initobj(n);    }    var children = n.childNodes;                    for(var i=0; i < children.length; i++) {            go(children[i]);          }         }function initroll(theframe) {    go(theframe.document.body);}