function menu(img_name,img_src) {
	
    document[img_name].src=img_src;

}

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height) {

    if(popUpWin) if(!popUpWin.closed) popUpWin.close();
    popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}

function random_img(imgs,brdr) {

    //var imgs = new Array()
    var ry=Math.floor(Math.random()*imgs.length);
    document.write('<img src='+imgs[ry]+' border='+brdr+'>');

}

function redirect(redirecturl,pausefor) {

    function postaction() {

        if(window.timer) {
            clearInterval(timer)
            clearInterval(timer_2)
        }

        window.location=redirecturl

    }

    setTimeout("postaction()",pausefor*1000)

}

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

function getflash(swf_file,swf_width,swf_height) {

    if(plugin){
        plugin=(parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=6);
    }
    else
        if((navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)&&((navigator.userAgent.indexOf("Windows 95")>=0)||(navigator.userAgent.indexOf("Windows 98")>=0)||(navigator.userAgent.indexOf("Windows NT")>=0))){
            document.write('<'+'script language="VBScript"'+'>\non error resume next\nplugin=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n</'+'script'+'>');
        }

    if(plugin){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+swf_width+'" height="'+swf_height+'"><param name="movie" value="'+swf_file+'"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="'+swf_file+'" quality="high" wmode="transparent" swLiveConnect="false" width="'+swf_width+'" height="'+swf_height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></object>');
    }
    else {
        document.write('Установите Flash Player');
    }

}

function CheckAll() {

    for (var i = 0; i < document.List.elements.length; i++) {

        if(document.List.elements[i].type == "checkbox") {

            document.List.elements[i].checked =!(document.List.elements[i].checked);

        }

    }

}
