function randomUUID() {
    var s = [], itoh = '0123456789ABCDEF';
    var i = 0;
    for (i = 0; i <36; i++) s[i] = Math.floor(Math.random()*0x10);
    s[14] = 4; // Set 4 high bits of time_high field to version
    s[19] = (s[19] & 0x3) | 0x8; // Specify 2 high bits of clock sequence
    i = 0
    for (; i <36; i++) s[i] = itoh.charAt(s[i]);
    s[8] = s[13] = s[18] = s[23] = '-';
    return s.join('');
}

function getHttpRequest(){
    http_request = false;

    if (window.XMLHttpRequest){
        // If IE7, Mozilla, Safari, etc: Use native object
        http_request = new XMLHttpRequest()
    }
    else
    {
        if (window.ActiveXObject){
            // ...otherwise, use the ActiveX control for IE5.x and IE6
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
        }
    }
    return http_request
}

function CreateBookmarkLink() {

    title = "布袋网络存储";
    url = "http://www.ibudai.com";
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(title, url,"");
    } else if( window.external ) { // IE Favorite
        window.external.AddFavorite(url, title);
    }
    else { // Opera Hotlist
        return true;
    }
    return false;
}

// for main menu
function navmouseover(elem){
  elem.style.backgroundColor='#f1690f'
}
function navmouseout(elem){
  elem.style.backgroundColor='transparent'
}
var loggingout = false;
function signoutGoogleOK(){
    if(loggingout){
        window.location = "/logout"
    }
}


