function refreshList(list_id, url) { $("#"+list_id).load(url); } function resizeLayout() { //detect the browser browserDetectionCode(); var window_height = 0; if($.IE < 9 && $.IE) { window_height = document.documentElement.clientHeight; }else{ window_height = window.innerHeight; } var tabs_menu = $('#tabs ul').outerHeight(); var header = $('#header').outerHeight(); var footer = $('#footer').outerHeight(); var max_height = window_height - tabs_menu - header - footer - 36; $("div.container").css("min-height", max_height).css("max-height", max_height); resizeLayoutCustomer(); resizeLayoutProducts(); resizeLayoutAboutUs(); resizeLayoutLicences(); resizeLayoutFeatures(); resizeLayoutLogging(); resizeSupport(); //window.setTimeout('resizeLayoutDevices()', 100); resizeLayoutDevices() } function resizeLayoutCustomer() { if(!$('#cont_1').hasClass('ui-tabs-hide')) { var list_size = $($("div.container")[0]).innerHeight()-$("#controls-customer").outerHeight()-$("#bartext-customer").outerHeight()-$("#customer-searchtext").outerHeight()-50; $('#customer-list').css('max-height', list_size).css('min-height', list_size); //$('#customer').css("min-height", $("div.container").innerHeight()-20); var height = ($("div.container").innerHeight()-40); if($('#customer-container').length != 0) { $('#customer-container').css('min-height', height).css('max-height', height).css('overflow', 'auto'); $('#customer').css('min-height', 1).css('max-height', 3000).css('overflow', ''); }else{ $('#customer').css('min-height', height+20).css('max-height', height+20).css('overflow', 'auto'); } } } function resizeLayoutLogging() { if($('#confirm-product').length != 1) { if(!$('#cont_3').hasClass('ui-tabs-hide')) { var height = $('#logging').height(); $('.logging-scroller').height(height-200); } }else{ if(!$('#cont_4').hasClass('ui-tabs-hide')) { var height = $('#logging').height(); $('.logging-scroller').height(height-200); } } } function resizeSupport() { if($('#confirm-product').length != 1) { if(!$('#cont_5').hasClass('ui-tabs-hide')) { var height = $('#support').height()-40; $('#support').css("min-height", height).css("max-height", height); } }else{ if(!$('#cont_6').hasClass('ui-tabs-hide')) { var height = $('#support').height()-40; $('#support').css("min-height", height).css("max-height", height); } } } function resizeLayoutAboutUs() { if($('#confirm-product').length != 1) { if(!$('#cont_4').hasClass('ui-tabs-hide')) { if($("div.container").length > 1) { var height = $('#about-us').innerHeight()-40; }else{ var height = $('#about-us').innerHeight()-40; } $('#about-us-container').css('min-height', height).css('max-height', height); } }else{ if(!$('#cont_5').hasClass('ui-tabs-hide')) { if($("div.container").length > 1) { var height = $('#about-us').innerHeight()-40; }else{ var height = $('#about-us').innerHeight()-40; } $('#about-us-container').css('min-height', height).css('max-height', height); } } } function resizeLayoutProducts() { if(!$('#cont_2').hasClass('ui-tabs-hide') && $('#licence').length == 0) { var list_size = $('#products_main_container').innerHeight()-$("#controls-products").outerHeight()-50; $('#products-list').stop().animate({ 'min-height': list_size, 'max-height': list_size }, 100); $('#products-list').css('max-height', list_size).css('min-height', list_size); var height = ($('#products_main_container').innerHeight()-40); $('#product-container').css('min-height', height).css('max-height', height); } } function resizeLayoutLicences() { if(!$('#cont_2').hasClass('ui-tabs-hide') && $('#licence').length == 1) { var table_height = $('#licence').innerHeight() - $('#licence-description-container').outerHeight()-60; $('#licence_table').css('min-height', table_height).css('max-height', table_height); } } function resizeLayoutFeatures() { if(!$('#cont_2').hasClass('ui-tabs-hide')) { var list_size = $('#products_main_container').innerHeight()-$("#controls-features").outerHeight()-50; $('#features-list').css('max-height', list_size).css('min-height', list_size); } } function resizeLayoutDevices() { if(!$('#cont_1').hasClass('ui-tabs-hide') && $('#devices').length && $('#devices').parent().css("display")) { var list_size = $('#customer-container').innerHeight()-$('#controls-device').outerHeight()-90; $('#devices-list').stop().animate({ 'min-height': list_size, 'max-height': list_size }, 100); } } function browserDetectionCode() { var z = jQuery, d = document, w = window, nv = navigator, ua = nv.userAgent, v, i, f; v = (ua.match(/.+(rv|WebKit|era|MSIE|Safari)[\/: ](\d+(\.\d)?)/)||[])[2] - 0; z.Kqn = z.Opera = z.Gecko = z.IE = z.WebKit = z.SWF = z.Chrome = z.Safari = z.Firefox = NaN; if (w.opera && opera.buildNumber) { z.Opera = (opera.version&&opera.version()||v)-0; } else if (/Konqueror/.test(ua)) { z.Kqn = 3; } else if (/WebKit/.test(ua)) { z.WebKit = parseInt(v, 10); if (i = ua.match(/Chrome\/(\d+(\.\d)?)/) ) { z.Chrome = +i[1]; } else if (i = /Safari/.test(ua) && ua.match(/Version\/(\d+(\.\d)?)/) ) z.Safari = +i[1]; } else if (/Gecko/.test(ua)) { if (i = ua.match(/rv:\d+\.\d+\.(\d)/)) if (i = i[1]/100) v+=i; z.Gecko = (v < 1.9 && d.getElementsByClassName ? 1.9 : v) || 1.9; if (i = ua.match(/Firefox\/(\d+(\.\d)?)/) ) z.Firefox = +i[1]; } else if (/xplorer/.test(nv.appName)) { z.IE = d.documentMode || v || 8; z.qIE = d.compatMode != "CSS1Compat"; } else z.Gecko = 1.9; // test flash try {f = !z.Kqn && (/(\d+(\.\d+)?)/).exec(nv.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description)[1]||false } catch (e) {f = false}; if (!f && z.IE && w.ActiveXObject) { try {f = (/WIN\s+(\d+)/).exec(new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"))[1] } catch (e) {}; }; if (f) z.SWF = +f || NaN; z.is_mobile = /Mobile/.test(ua); z.is_j2me = /J2ME[\/]/.test(nv.appVersion); z.osWin = /Windows/.test(ua); z.osMac = /Mac OS/.test(ua); z.osLnx = /Linux/.test(ua); //now that we have gathered the codes, we move on to displaying the customer a warning, if he's using an untested browser if(($.Firefox && $.Firefox) >= 3 || ($.Safari && $.Safari) >= 4 || ($.IE && $.IE >= 7) || ($.Chrome && $.Chrome >= 5)) { }else{ $('#browser_container').css("display", ""); } //browser-warning }