//
function fixPNG(element,act){if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var src;if (element.tagName=='IMG'){if (/\.png$/.test(element.src)){src = element.src;element.src = "/images/blank.gif";}}else{src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if (src){src = src[1];element.runtimeStyle.backgroundImage="none";}}if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "'"+(act?",sizingMethod='scale'":'')+")";}}
// новое окно с видео
function newWindow(url,width,height,pic) {
	
	var left   = (screen.width  - width)/2;
	var top    = (screen.height - height)/2;
	var params = 'width='+width+', height='+height;
	params += ', top='+top+', left='+left;
	params += ', directories=no';
	params += ', location=no';
	params += ', menubar=no';
	params += ', resizable=no';
	params += ', scrollbars=no';
	params += ', status=no';
	params += ', toolbar=no';
	newwin=window.open(url+pic,'windowname5', params);
	if (window.focus) {newwin.focus()}
	return false;
}

function clicksearch () {
    document.searchform.submit();
}
function clicksearch1 () {
    document.searchform1.submit();
}
function clickauth () {
    document.authform.submit();
}
function gHomePage(objSrc) {
    var homepage = "http://" + location.host;    
    if (objSrc.style.behavior) {
        // MSIE
        objSrc.setHomePage(homepage);    
    } else if (netscape
                && netscape.security 
                && netscape.security.PrivilegeManager 
                && navigator.preference) {
        // Mozilla/FireFox
        alert('Перетащите эту ссылку на значок домашней страницы браузера');
        //netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");        
        //navigator.preference("browser.startup.homepage", homepage);    
    }
}
function spoiler() {
    $(document).ready(function(){
        $("div.divplus").click(function () {
            if ($(this).next().is(":hidden")){
    			$(this).next().stop(true,true).slideToggle("slow");
    		}else{
    			$(this).next().stop(true,true).hide();
    		}
        });  
        $("td.divplus").mouseover(function(){
            $(this).css('color','#ff0000');
        }).mouseout(function(){
            $(this).css('color','#1155a4');
        });
    });
}
