﻿


/*var bookmarktitle="xxx.yy"
function addbookmark()
{
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function addToFavorite(linkObj, addUrl, addTitle) {
    if (document.all && !window.opera) {
        window.external.AddFavorite(addUrl, addTitle);
        return false;
    }
    else if (window.opera && window.print) {
        linkObj.title = addTitle;
        return true;
    }
    else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')) {
        if (window.confirm('Přidat oblíbenou stránku jako nový panel?')) {
            window.sidebar.addPanel(addTitle, addUrl, '');
            return false;
        }
    }
    window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
    return false;
} */

 function bookmarksite(title,url){
 if (window.sidebar) // firefox
     //window.sidebar.addPanel(title, url, ""); Dont use until it's fixed
     alert('Dear Firefox user, please press CTRL+D to Bookmark this page!');
 else if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
     elem.setAttribute('href',url);
     elem.setAttribute('title',title);
     elem.setAttribute('rel','sidebar');
     elem.click();
 } 
 else if(document.all)// ie
     window.external.AddFavorite(url, title);
 }

				
function OpenWnd2(strURL)
{
    var objWnd = window.open(strURL,"InfoDetail","scrollbars=no,resizable=yes,height=500,width=550,left=10,top=10");
    objWnd.focus();
}

function OpenWnd(strURL,wid,hei)
{
    var objWnd = window.open(strURL,"InfoDetail","scrollbars=no,resizable=yes,height="+hei+",width="+wid+",left=10,top=10");
    objWnd.focus();
}

//zaškrtávání checkboxů hromadně
function SelectAllCheckboxes(spanChk)
{
   // Added as ASPX uses SPAN for checkbox
   var oItem = spanChk.children;
   var theBox= (spanChk.type=="checkbox") ? 
        spanChk : spanChk.children.item[0];
   xState=theBox.checked;
   elm=theBox.form.elements;

   for(i=0;i<elm.length;i++)
     if(elm[i].type=="checkbox" && 
              elm[i].id!=theBox.id)
     {
       //elm[i].click();
       if(elm[i].checked!=xState)
         elm[i].click();
       //elm[i].checked=xState;
     }
 }
/*
 function setHomepage() {
     if (document.all) {
         document.body.style.behavior = 'url(#default#homepage)';
         document.body.setHomePage('http://www.asp.net/130.aspx');

     }
     else if (window.sidebar) {
         if (window.netscape) {
             try {
                 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
             }
             catch (e) {
                 alert("this action was aviod by your browser，if you want to enable，please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");
             }
         }
         var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
         prefs.setCharPref('browser.startup.homepage', 'http://www.asp.net/130.aspx');
     }
 }
*/

