﻿$(function() {
    resize_flash();
    $(window).bind('resize',function() {
        resize_flash();
    });
    $('#divMySiva').mouseover(function() { 
        showMySiva();
    })
    init_mouseleave();
})

function resize_flash() {
    var content_height = $(window).height() - 80 - 20;
    var content_width = $(window).width();
    $('#content_wrapper').css('height',content_height +'px');

    if(content_height < 300) {
	  $('#content_w').height(300);
    }
    else {
	  $('#content_w').width('100%'); 
	  $('#content_w').height('100%');
    }
}

function showMySiva() {
	$('#divFormMySiva').show();
}

function init_mouseleave() {
    var theList = document.getElementById('divFormMySiva');
    xb.addEvent(theList, 'mouseleave', leave, false);
}

function leave(e) {
    $('#divFormMySiva').hide();
}
    
function _spFormOnSubmitWrapper2() {
    if(_spSuppressFormOnSubmitWrapper) {
        return true;
    }
    if(_spFormOnSubmitCalled) { 
        return false;
    }
    if (typeof(_spFormOnSubmit)=="function") {
        var retval=_spFormOnSubmit();
        var testval=false;
        if(typeof(retval)==typeof(testval) && retval==testval) {
            return false;
        }
    }
    if((typeof(Sys) != 'undefined' ) 
        && (typeof(Sys.WebForms) != 'undefined' )
        && (Sys.WebForms.PageRequestManager.getInstance() != null)
        && (Sys.WebForms.PageRequestManager.getInstance()._postBackSettings.panelID != '')) {
        _spFormOnSubmitCalled=false;
    }
    else {
        _spFormOnSubmitCalled=true; 
    }
    
    RestoreToOriginalFormAction();
    _spFormOnSubmitCalled=true;
    return true;
}
