ids = new Array(19,1,2,3,13,4,14,16,5,20,18,23,15,6,7,8,21,22,9,17,10,11,12);

function lnk(){
var aa= 11;
}

function MM_findObj(n, d) {
  var p,i,x;if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function setY(obj,y) {
x=MM_findObj(obj);
//x.visibility="hidden";
if(!x.style)
{

document.layers[obj].pageY=y;

}
else {
x.style.top=y;
}
}

function setX(obj,x) {
o=MM_findObj(obj);
//x.visibility="hidden";
if(!o.style)
{

document.layers[obj].pageX=x;

}
else {
o.style.left=x;
}
}

function getY(obj) {
x=MM_findObj(obj);
//x.visibility="hidden";
if(!x.style)
{

return document.layers[obj].pageY;

}
else {
return x.offsetTop;
}
}

function getX(obj) {
o=MM_findObj(obj);
//x.visibility="hidden";
if(!o.style)
{

return document.layers[obj].pageX;

}
else {
return o.offsetLeft;
}
}

/*
function sibling(parent,child,action,n) {
pY=getY(parent);
pX=getX(parent);
setY(child,pY+5+20*n);
setX(child,pX+121);
MM_showHideLayers(child,'',action);
}*/

var flag=0;
ar1=new Image;
ar1.src="arrowa.gif";
ar2=new Image;
ar2.src="arrowp.gif";

function autors() {
//alert(document.images[3].src);

         if(flag==0) {
         MM_showHideLayers('div1','','show');
         flag=1;
         document.images[3].src=ar1.src;
         }
         else {
         MM_showHideLayers('div1','','hide');
         flag=0;
         document.images[3].src=ar2.src;
         }
}



// Dynamic Layer Object with width and height and frameref (for IE)
function dynLayer(id,nestref,frameref) {

        if (n) {
                if (nestref) {
              this.css = eval("document." + nestref + ".document." + id);
              this.ref = eval("document." + nestref + ".document." + id + ".document");
                }
                else {
                        this.css = document.layers[id];
                        this.ref = document.layers[id].document;
                }
                this.x = this.css.left;
                this.y = this.css.top;
                this.width = this.ref.width;
                this.height = this.ref.height;
        }


        else if (ie) {
                if (frameref) {
                        this.css = parent.frames[frameref].document.all[id].style;
                        this.ref = parent.frames[frameref].document;
                }
                else {
                        this.css = document.all[id].style;
                        this.ref = document;
                }
                this.x = this.css.pixelLeft;
                this.y = this.css.pixelTop;
                this.width = this.ref.all[id].offsetWidth;
                this.height = this.ref.all[id].offsetHeight;
        }

        else if (n6) {
                //alert(document.getElementById(id));
              this.css = document.getElementById(id);
              this.ref = this.css.document;
              this.x = getIdProperty(id,'left');
              this.x = parseInt(this.x.substr(0, this.x.length-2));
              this.y = getIdProperty(id,'top');
              this.x = parseInt(this.y.substr(0, this.y.length-2));
              this.width = getIdProperty(id,'width');
              this.width = parseInt(this.width.substr(0, this.width.length-2));
              //this.height = getIdProperty(id,'height');
              //this.height = parseInt(this.height.substr(0, this.height.length-2));
              this.height = document.getElementById(id).offsetHeight;
              setIdProperty( id, 'height', this.height );


        }
        this.obj = id + "Object";
        this.oid = id;
        eval(this.obj + "=this");
        this.move = moveMe;
        //this.show = dynLayerShow
        //this.hide = dynLayerHide
        this.scrollfactor = 0;
        this.scrolling = false;
        //alert(this.height);


}

function moveMe(x,y) {
        this.x += x;
        this.css.left = this.x;
        this.y += y;
        this.css.top = this.y;
}


x=0;

function scroll(obj) {
//alert(obj.height);
x=obj;
x.scrolling = true;
scrollObj();
//alert(scrollfactor);
}

function scrollUp(obj) {
//alert(obj.height);
x=obj;
x.scrolling = true;
scrollObjUp();
//alert(scrollfactor);
}

function stopScroll(obj) {
x=obj;
x.scrolling = false;
//alert(scrollfactor);
}


//document.all["field2"].style.pixelTop += 30;
//alert(obj.height);
//document.win2.document.textBox2.document.field2.top +=30;
//scrolltext.css.top +=30;
//scrolltext.css.pixelTop +=30;

function scrollObj(){

            if(x.scrollfactor < x.height-158 && x.scrolling){
                        //alert(x.height);
                        if(!n6) x.move(0,-2);
                        if(n6) moveBy(x.oid, 0, -2);
                        x.scrollfactor +=2;
                        setTimeout("scrollObj()",20);
            }

}

function scrollObjUp(){
            if(x.scrollfactor > 0 && x.scrolling){

                        if(!n6) x.move(0,2);
                        if(n6) moveBy(x.oid, 0, 2);
                        x.scrollfactor -=2;
                        setTimeout("scrollObjUp()",20);
            }

}


//scrolltext2.move(0,10);
//alert(scrolltext2.obj);

function mywin(field1, field2, field3, wid) {
this.field1 = field1;
this.field2 = field2;
this.field3 = field3;
this.wid = wid;
this.visibleField = this.field1;
this.test = change;
this.tabs = ftabs;

          function change(winnum) {
//alert(winnum);

                   if(winnum==1) {
                   MM_showHideLayers((('field' + this.wid) + 1),'','show');
                   MM_showHideLayers((('field' + this.wid) + 2),'','hide');
                   MM_showHideLayers((('field' + this.wid) + 3),'','hide');
                   this.visibleField = this.field1;
                     }
                   else if(winnum==2) {
                   MM_showHideLayers((('field' + this.wid) + 2),'','show');
                   MM_showHideLayers((('field' + this.wid) + 1),'','hide');
                   MM_showHideLayers((('field' + this.wid) + 3),'','hide');
                   this.visibleField = this.field2;
                   }
                   else {
                   MM_showHideLayers((('field' + this.wid) + 3),'','show');
                   MM_showHideLayers((('field' + this.wid) + 1),'','hide');
                   MM_showHideLayers((('field' + this.wid) + 2),'','hide');
                   this.visibleField = this.field3;
                   }
         }

         function ftabs(gifnum) {
         //alert(this.wid);
         //alert(document.tab1.document.images["map1"].src);
         this.tb = eval("document.tab" + this.wid);
         if(n) {
         if(gifnum==1) {

         this.tb.document.images["map" + this.wid].src=tab1.src;
         }
         if(gifnum==2) {
         this.tb.document.images["map" + this.wid].src=tab2.src;
         }
         if(gifnum==3) {
         this.tb.document.images["map" + this.wid].src=tab3.src;
         }
         }
         else {
         if(gifnum==1) {
         document.images["map" + this.wid].src=tab1.src;
         }
         if(gifnum==2) {
         document.images["map" + this.wid].src=tab2.src;
         }
         if(gifnum==3) {
         document.images["map" + this.wid].src=tab3.src;
         }
         }
         }
}



function init() {


scrolltext11 = new dynLayer("field11","win1.document.textbox1");
//alert(scrolltext11.obj);
scrolltext12 = new dynLayer("field12","win1.document.textbox1");
scrolltext13 = new dynLayer("field13","win1.document.textbox1");

scrolltext21 = new dynLayer("field21","win2.document.textbox2");
scrolltext22 = new dynLayer("field22","win2.document.textbox2");
scrolltext23 = new dynLayer("field23","win2.document.textbox2");

scrolltext31 = new dynLayer("field31","win3.document.textbox3");
scrolltext32 = new dynLayer("field32","win3.document.textbox3");
scrolltext33 = new dynLayer("field33","win3.document.textbox3");

scrolltext41 = new dynLayer("field41","win4.document.textbox4");
scrolltext42 = new dynLayer("field42","win4.document.textbox4");
scrolltext43 = new dynLayer("field43","win4.document.textbox4");

scrolltext51 = new dynLayer("field51","win5.document.textbox5");
scrolltext52 = new dynLayer("field52","win5.document.textbox5");
scrolltext53 = new dynLayer("field53","win5.document.textbox5");

scrolltext61 = new dynLayer("field61","win6.document.textbox6");
scrolltext62 = new dynLayer("field62","win6.document.textbox6");
scrolltext63 = new dynLayer("field63","win6.document.textbox6");

scrolltext71 = new dynLayer("field71","win7.document.textbox7");
scrolltext72 = new dynLayer("field72","win7.document.textbox7");
scrolltext73 = new dynLayer("field73","win7.document.textbox7");

scrolltext81 = new dynLayer("field81","win8.document.textbox8");
scrolltext82 = new dynLayer("field82","win8.document.textbox8");
scrolltext83 = new dynLayer("field83","win8.document.textbox8");

scrolltext91 = new dynLayer("field91","win9.document.textbox9");
scrolltext92 = new dynLayer("field92","win9.document.textbox9");
scrolltext93 = new dynLayer("field93","win9.document.textbox9");

scrolltext101 = new dynLayer("field101","win10.document.textbox10");
scrolltext102 = new dynLayer("field102","win10.document.textbox10");
scrolltext103 = new dynLayer("field103","win10.document.textbox10");

scrolltext111 = new dynLayer("field111","win11.document.textbox11");
scrolltext112 = new dynLayer("field112","win11.document.textbox11");
scrolltext113 = new dynLayer("field113","win11.document.textbox11");

scrolltext121 = new dynLayer("field121","win12.document.textbox12");
scrolltext122 = new dynLayer("field122","win12.document.textbox12");
scrolltext123 = new dynLayer("field123","win12.document.textbox12");


scrolltext131 = new dynLayer("field131","win13.document.textbox13");
scrolltext132 = new dynLayer("field132","win13.document.textbox13");
scrolltext133 = new dynLayer("field133","win13.document.textbox13");

scrolltext141 = new dynLayer("field141","win14.document.textbox14");
scrolltext142 = new dynLayer("field142","win14.document.textbox14");
scrolltext143 = new dynLayer("field143","win14.document.textbox14");

scrolltext151 = new dynLayer("field151","win15.document.textbox15");
scrolltext152 = new dynLayer("field152","win15.document.textbox15");
scrolltext153 = new dynLayer("field153","win15.document.textbox15");

scrolltext161 = new dynLayer("field161","win16.document.textbox16");
scrolltext162 = new dynLayer("field162","win16.document.textbox16");
scrolltext163 = new dynLayer("field163","win16.document.textbox16");

scrolltext171 = new dynLayer("field171","win17.document.textbox17");
scrolltext172 = new dynLayer("field172","win17.document.textbox17");
scrolltext173 = new dynLayer("field173","win17.document.textbox17");

scrolltext181 = new dynLayer("field181","win18.document.textbox18");
scrolltext182 = new dynLayer("field182","win18.document.textbox18");
scrolltext183 = new dynLayer("field183","win18.document.textbox18");

scrolltext191 = new dynLayer("field191","win19.document.textbox19");
scrolltext192 = new dynLayer("field192","win19.document.textbox19");
scrolltext193 = new dynLayer("field193","win19.document.textbox19");

scrolltext201 = new dynLayer("field201","win20.document.textbox20");
scrolltext202 = new dynLayer("field202","win20.document.textbox20");
scrolltext203 = new dynLayer("field203","win20.document.textbox20");

scrolltext211 = new dynLayer("field211","win21.document.textbox21");
scrolltext212 = new dynLayer("field212","win21.document.textbox21");
scrolltext213 = new dynLayer("field213","win21.document.textbox21");

scrolltext221 = new dynLayer("field221","win22.document.textbox22");
scrolltext222 = new dynLayer("field222","win22.document.textbox22");
scrolltext223 = new dynLayer("field223","win22.document.textbox22");

scrolltext231 = new dynLayer("field231","win23.document.textbox23");
scrolltext232 = new dynLayer("field232","win23.document.textbox23");
scrolltext233 = new dynLayer("field233","win23.document.textbox23");

mywin1 = new mywin(scrolltext11,scrolltext12,scrolltext13,1);
mywin2 = new mywin(scrolltext21,scrolltext22,scrolltext23,2);
mywin3 = new mywin(scrolltext31,scrolltext32,scrolltext33,3);
mywin4 = new mywin(scrolltext41,scrolltext42,scrolltext43,4);
mywin5 = new mywin(scrolltext51,scrolltext52,scrolltext53,5);
mywin6 = new mywin(scrolltext61,scrolltext62,scrolltext63,6);
mywin7 = new mywin(scrolltext71,scrolltext72,scrolltext73,7);
mywin8 = new mywin(scrolltext81,scrolltext82,scrolltext83,8);
mywin9 = new mywin(scrolltext91,scrolltext92,scrolltext93,9);
mywin10 = new mywin(scrolltext101,scrolltext102,scrolltext103,10);
mywin11 = new mywin(scrolltext111,scrolltext112,scrolltext113,11);
mywin12 = new mywin(scrolltext121,scrolltext122,scrolltext123,12);
mywin13 = new mywin(scrolltext131,scrolltext132,scrolltext133,13);
mywin14 = new mywin(scrolltext141,scrolltext142,scrolltext143,14);
mywin15 = new mywin(scrolltext151,scrolltext152,scrolltext153,15);
mywin16 = new mywin(scrolltext161,scrolltext162,scrolltext163,16);
mywin17 = new mywin(scrolltext171,scrolltext172,scrolltext173,17);
mywin18 = new mywin(scrolltext181,scrolltext182,scrolltext183,18);
mywin19 = new mywin(scrolltext191,scrolltext192,scrolltext193,19);
mywin20 = new mywin(scrolltext201,scrolltext202,scrolltext203,20);
mywin21 = new mywin(scrolltext211,scrolltext212,scrolltext213,21);
mywin22 = new mywin(scrolltext221,scrolltext222,scrolltext223,22);
mywin23 = new mywin(scrolltext231,scrolltext232,scrolltext233,23);
//alert(mywin1.field1.obj);
//alert("aaaaaaaa");
}


var isNav4, isNav6, isIE4;

/*
 * Browser version snooper; determines your browser
 * (Navigator 4, Navigator 6, or Internet Explorer 4/5)
 */
function setBrowser()
{
    if (navigator.appVersion.charAt(0) == "4")
    {
        if (navigator.appName.indexOf("Explorer") >= 0)
        {
            isIE4 = true;
        }
        else
        {
            isNav4 = true;
        }
    }
    else if (navigator.appVersion.charAt(0) > "4")
    {
        isNav6 = true;
    }
}

/*
 *
 * Given a selector string, return a style object
 * by searching through stylesheets. Return null if
 * none found
 *
 */
function getStyleBySelector( selector )
{
    if (!isNav6)
    {
        return null;
    }
    var sheetList = document.styleSheets;
    var ruleList;
    var i, j;

    /* look through stylesheets in reverse order that
       they appear in the document */
    for (i=sheetList.length-1; i >= 0; i--)
    {
        ruleList = sheetList[i].cssRules;
        for (j=0; j<ruleList.length; j++)
        {
            if (ruleList[j].type == CSSRule.STYLE_RULE &&
                ruleList[j].selectorText == selector)
            {
                return ruleList[j].style;
            }
        }
    }
    return null;
}

/*
 *
 * Given an id and a property (as strings), return
 * the given property of that id.  Navigator 6 will
 * first look for the property in a tag; if not found,
 * it will look through the stylesheet.
 *
 * Note: do not precede the id with a # -- it will be
 * appended when searching the stylesheets
 *
 */
function getIdProperty( id, property )

{

//-------------------

setBrowser();

//---------------------
    if (isNav6)
    {
        var styleObject = document.getElementById( id );
        if (styleObject != null)
        {
            styleObject = styleObject.style;
            if (styleObject[property])
            {
                return styleObject[ property ];
            }
        }
        styleObject = getStyleBySelector( "#" + id );
        return (styleObject != null) ?
            styleObject[property] :
            null;
    }
    else if (isNav4)
    {
        return document[id][property];
    }
    else
    {
        return document.all[id].style[property];
    }
}

/*
 *
 * Given an id and a property (as strings), set
 * the given property of that id to the value provided.
 *
 * The property is set directly on the tag, not in the
 * stylesheet.
 *
 */
function setIdProperty( id, property, value )
{
    if (isNav6)
    {
        var styleObject = document.getElementById( id );
        if (styleObject != null)
        {
            styleObject = styleObject.style;
            styleObject[ property ] = value;
        }

        /*
        styleObject = getStyleBySelector( "#" + id );
        if (styleObject != null)
        {
            styleObject[property] = value;
        }
        */
    }
    else if (isNav4)
    {
        document[id][property] = value;
    }
    else if (isIE4)
    {
         document.all[id].style[property] = value;
    }
}

/*
 *
 * Move a given id.  If additive is true,
 * then move it by xValue dots horizontally and
 * yValue units vertically.  If additive is
 * false, then move it to (xValue, yValue)
 *
 * Note: do not precede the id with a # -- it will be
 * appended when searching the stylesheets
 *
 * Note also: length units are preserved in Navigator 6
 * and Internet Explorer. That is, if left is 2cm and
 * top is 3cm, and you move to (4, 5), the left will
 * become 4cm and the top 5cm.
 *
 */
function generic_move( id, xValue, yValue, additive )
{
    var left = getIdProperty(id, "left");
    var top = getIdProperty(id, "top");
    var leftMatch, topMatch;

    if (isNav4)
    {
        leftMatch = new Array( 0, left, "");
        topMatch = new Array( 0, top, "");
    }
    else if (isNav6 || isIE4 )
    {
        var splitexp = /([-0-9.]+)(\w+)/;
        leftMatch = splitexp.exec( left );
        topMatch = splitexp.exec( top );
        if (leftMatch == null || topMatch == null)
        {
            leftMatch = new Array(0, 0, "px");
            topMatch = new Array(0, 0, "px");
        }
    }
    left = ((additive) ? parseFloat( leftMatch[1] ) : 0) + xValue;
    top = ((additive) ? parseFloat( topMatch[1] ) : 0) + yValue;
    setIdProperty( id, "left", left + leftMatch[2] );
    setIdProperty( id, "top", top + topMatch[2] );
}

/*
 *
 * Move a given id to position (xValue, yValue)
 *
 */
function moveTo( id, x, y )
{
    generic_move( id, x, y, false );
}

/*
 *
 * Move a given id to (currentX + xValue, currentY + yValue)
 *
 */
function moveBy( id, x, y)
{
    generic_move( id, x, y, true );
}

/*
 *
 * Function used when converting rgb format colors
 * from Navigator 6 to a hex format
 *
 */
function hex( n )
{
    var hexdigits = "0123456789abcdef";
    return ( hexdigits.charAt(n >> 4) + hexdigits.charAt(n & 0x0f) );
}

/*
 *
 * Retrieve background color for a given id.
 * The value returned will be in hex format (#rrggbb)
 *
 */
function getBackgroundColor( id )
{
    var color;

    if (isNav4)
    {
        color = document[id].bgColor;
    }
    else if (isNav6)
    {
        var parseExp = /rgb.(\d+),(\d+),(\d+)./;
        var rgbvals;
        color = getIdProperty( id, "backgroundColor" );
        if (color)
        {
            rgbvals = parseExp.exec( color );
            if (rgbvals)
            {
                color = "#" + hex( rgbvals[1] ) + hex( rgbvals[2] ) +
                    hex( rgbvals[3] );
            }
        }
        return color;
    }
    else if (isIE4)
    {
        return document.all[id].backgroundColor;
    }
    return "";
}

/*
 *
 * Return a division's document
 *
 */
function getDocument( divName )
{
    var doc;

    if (isNav4)
    {
        doc = window.document[divName].document;
    }
    else if (isNav6)
    {
        doc = document;
    }
    else if (isIE4)
    {
        doc = document;
    }
    return doc;
}
