// BEGIN: Roll Over Images
function Rollover () {
        this.images = new Array();

        this.addImage = rlvr_m_addImage;
        this.getImageInfo = rlvr_m_getImageInfo;
        this.findImage = rlvr_m_findImage;
        this.off = rlvr_m_off;
        this.on = rlvr_m_on;
        this.toggle = rlvr_m_toggle;
}

function rlvr_m_addImage (imageName, activeImage) {
        var aImg = new Image();
        aImg.src = activeImage;

        var img = this.findImage(imageName);
        if (img) {
                var pImg = new Image();
                pImg.src = img.src;
        }
        var imageInfo = new Array(imageName, aImg, pImg, img);

        this.images[this.images.length] = imageInfo;
}

function rlvr_m_getImageInfo (imageName) {
        var i;

        for (i = 0; i < this.images.length; i++) {
                var imageInfo = this.images[i];

                if (imageInfo[0] == imageName)
                        return imageInfo;
        }
}

function rlvr_m_findImage (imageName) {
        return document.images[imageName];

}

function rlvr_m_off (imageName) {
        this.toggle(imageName, false);
}

function rlvr_m_on (imageName) {
        this.toggle(imageName, true);
}

function rlvr_m_toggle (imageName, on) {
        var imageInfo = this.getImageInfo(imageName);

        if (imageInfo) {
                imageInfo[3].src = imageInfo[on ? 1 : 2].src;
        }
}
// END: Roll Over Images

// BEGIN: Roll Over Images
function RolloverX () {
        this.images = new Array();

        this.addImageX = rlvr_m_addImageX;
        this.getImageInfoX = rlvr_m_getImageInfoX;
        this.findImageX = rlvr_m_findImageX;
        this.offX = rlvr_m_offX;
        this.onX = rlvr_m_onX;
        this.toggleX = rlvr_m_toggleX;
}

function rlvr_m_addImageX (imageName, activeImage, iNum) {
        var aImg = new Image();
        aImg.src = activeImage;

        var img = this.findImageX(imageName);
        if (img) {
                var pImg = new Image();
                pImg.src = img.src;
        }
        var imageInfo = new Array(imageName, aImg, pImg, img, iNum);

        this.images[this.images.length] = imageInfo;
}

function rlvr_m_getImageInfoX (imageName, iNum) {
        var i;

        for (i = 0; i < this.images.length; i++) {
                var imageInfo = this.images[i];

                if ((imageInfo[0] == imageName) & (imageInfo[4] == iNum))
                        return imageInfo;
        }
}

function rlvr_m_findImageX (imageName) {
        return document.images[imageName];

}

function rlvr_m_offX (imageName, iNum) {
        this.toggleX(imageName, false, iNum);
}

function rlvr_m_onX (imageName, iNum) {
        this.toggleX(imageName, true, iNum);
}

function rlvr_m_toggleX (imageName, on, iNum) {
        var imageInfo = this.getImageInfoX(imageName, iNum);

        if (imageInfo) {
                imageInfo[3].src = imageInfo[on ? 1 : 2].src;
        }
}
// END: Roll Over Images


 function onChangeColNom(type)
 {
         if (type==1||type==2)
         {
           if (document.forms['RegForm'].col.value==0)document.forms['RegForm'].Stoim.value=0;
           if (document.forms['RegForm'].col.value==1)document.forms['RegForm'].Stoim.value=280;
           if (document.forms['RegForm'].col.value==2)document.forms['RegForm'].Stoim.value=540;
           if (document.forms['RegForm'].col.value==3)document.forms['RegForm'].Stoim.value=800;
           if (document.forms['RegForm'].col.value==4)document.forms['RegForm'].Stoim.value=1050;
           if (document.forms['RegForm'].col.value==5)document.forms['RegForm'].Stoim.value=1225;
           if (document.forms['RegForm'].col.value==6)document.forms['RegForm'].Stoim.value=1470;
         }
         if (type==3||type==4)
         {
           if (document.forms['RegForm'].col.value==0)document.forms['RegForm'].Stoim.value=0;
           if (document.forms['RegForm'].col.value==1)document.forms['RegForm'].Stoim.value=12900;
           if (document.forms['RegForm'].col.value==3)document.forms['RegForm'].Stoim.value=29700;
           if (document.forms['RegForm'].col.value==5)document.forms['RegForm'].Stoim.value=1225;
           if (document.forms['RegForm'].col.value==6)document.forms['RegForm'].Stoim.value=7000;
           if (document.forms['RegForm'].col.value==12)document.forms['RegForm'].Stoim.value=13800;
         }
 }

 function CopyAddress()
 {
         var tmp;
         tmp=document.forms['RegForm'].mailIndex.value;
         tmp+=", ";
         tmp+=document.forms['RegForm'].country.value;
         tmp+=", ";
         tmp+=document.forms['RegForm'].city.value;
         tmp+=", óë.";
         tmp+=document.forms['RegForm'].streat.value;
         tmp+=", ä.";
         tmp+=document.forms['RegForm'].home.value;
         tmp+=", êîðï.";
         tmp+=document.forms['RegForm'].korp.value;
         tmp+=", ";
         tmp+=document.forms['RegForm'].office.value;
         document.forms['RegForm'].address.value=tmp;

 }

