function comSlider14665() { var self = this; var g_HostRoot = ""; var g_TransitionTimeoutRef = null; var g_CycleTimeout = 8; var g_currFrame = 0; var g_currDate = new Date(); var g_currTime = g_currDate.getTime();var g_microID = g_currTime + '-' + Math.floor((Math.random()*1000)+1); var g_InTransition = 0;var g_Navigation = 0;this.getCurrMicroID = function() { return g_microID; } this.comSLoadImgInFrame = function(frameid, src) { jqCS14665("#comSImg14665_"+frameid+" img").attr("src", src).load(function(){ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) { //broken image } }); } this.setNavStyle = function(id, background, color, border, type) { if (background == "") { jqCS14665("#comSNavigation14665_"+id).css("background", "none"); } else { jqCS14665("#comSNavigation14665_"+id).css("background", "#"+background); } jqCS14665("#comSNavigation14665_"+id).css("background", "#"+background); jqCS14665("#comSNavigation14665_"+id).css("color", "#"+color); jqCS14665("#comSNavigation14665_"+id).css("border", border+"px solid #"+color); var margin = (-1)*border; jqCS14665("#comSNavigation14665_"+id).css("margin-top", margin+"px"); jqCS14665("#comSNavigation14665_"+id).css("margin-left", margin+"px"); if (type == 0) { jqCS14665("#comImgBullet14665_"+id).show(); jqCS14665("#comImgBulletcurr14665_"+id).hide(); } else { jqCS14665("#comImgBulletcurr14665_"+id).show(); jqCS14665("#comImgBullet14665_"+id).hide(); } } this.targetClearTimeouts = function() { if (g_TransitionTimeoutRef != null) { window.clearTimeout(g_TransitionTimeoutRef); g_TransitionTimeoutRef = null;} } this.getNextFrame = function() { var ret = g_currFrame; ret++; if (ret == 2) {ret = 0;} return ret; } this.getPrevFrame = function() { var ret = g_currFrame; ret--; if (ret < 0) {ret = (5-1);} return ret; } this.stopAll = function() { jqCS14665("#comSFrame14665_0").stop(true, true);jqCS14665("#comSFrameSek14665_0").stop(true, true);jqCS14665("#comSFrame14665_1").stop(true, true);jqCS14665("#comSFrameSek14665_1").stop(true, true); } this.switchFrame = function() { g_Navigation = 1; var currFrame=g_currFrame; g_currFrame = self.getNextFrame(); self.switchFromToFrame(currFrame, g_currFrame); } this.switchFramePrev = function() { g_Navigation = 0; var currFrame=g_currFrame; g_currFrame = self.getPrevFrame(); self.switchFromToFrame(currFrame, g_currFrame); } this.switchToFrame = function(toFrame) { if ((g_InTransition == 1) || (g_currFrame == toFrame)) { if (g_currFrame == toFrame) { return false; } self.stopAll(); } var currFrame=g_currFrame; g_currFrame=toFrame; if (currFrame < g_currFrame) g_Navigation = 0; else g_Navigation = 1; self.switchFromToFrame(currFrame, g_currFrame); } this.switchFromToFrame = function(currFrame, toFrame) { if (g_InTransition == 1) { self.stopAll(); } g_InTransition = 1; self.startTransitionTimer(); jqCS14665("#comSFrameSek14665_"+currFrame+"").css("z-index", 1); jqCS14665("#comSFrameSek14665_"+toFrame+"").css("z-index", 2); jqCS14665("#comSFrameSek14665_"+toFrame+"").hide().fadeIn(1350, function() { } ); jqCS14665("#comSFrameSek14665_"+currFrame+"").fadeOut(1350); self.setNavStyle(currFrame, '','FFFFFF',0, 0); self.setNavStyle(toFrame, '','002F8C',0, 1);jqCS14665("#comSFrame14665_"+currFrame).hide("slide", { direction: "left" }, 1500); jqCS14665("#comSFrame14665_"+toFrame).show("slide", { direction: "right" }, 1500, function() {if (g_microID !=objcomSlider14665.getCurrMicroID()){return false;}; jqCS14665("#comSFrame14665_"+currFrame).hide(); g_InTransition = 0; }); } this.startTransitionTimer = function() { self.targetClearTimeouts(); g_TransitionTimeoutRef = window.setTimeout(function() {objcomSlider14665.onTransitionTimeout(g_microID)}, g_CycleTimeout*1000); } this.onTransitionTimeout = function(microID) { if (g_microID != microID) { return false; } self.switchFrame(); } this.initFrame = function() { g_currFrame = 0; self.startTransitionTimer(); jqCS14665("#comSFrameSek14665_"+g_currFrame+"").hide().fadeIn(1350); jqCS14665("#comSFrame14665_"+g_currFrame).show(1, function(){if (g_microID !=objcomSlider14665.getCurrMicroID()){return false;};self.setNavStyle(g_currFrame, '','002F8C',0, 1); }); return true; } this.scriptLoaded = function() { jqCS14665 = jQuery14665.noConflict(false); jqCS14665("#comslider_in_point_14665").html('
 
 
'); jqCS14665("#comslider_in_point_14665 a").bind('click', function() { if ((this.name.length > 0) && (isNaN(this.name) == false)) { self.switchToFrame(parseInt(this.name)); return false;} }); self.comSLoadImgInFrame("0", "/Global/Assets/Office365-2.jpg");jqCS14665("#comSFrame14665_0").hide();self.comSLoadImgInFrame("1", "/Global/Assets/Dump-router.jpg");jqCS14665("#comSFrame14665_1").hide();jqCS14665("#comSFrame14665_3").hide(); self.initFrame(); } var g_CSIncludes = new Array(); var g_CSLoading = false; var g_CSCurrIdx = 0; this.include = function(src, last) { if (src != '') { var tmpInclude = Array(); tmpInclude[0] = src; tmpInclude[1] = last; // g_CSIncludes[g_CSIncludes.length] = tmpInclude; } if ((g_CSLoading == false) && (g_CSCurrIdx < g_CSIncludes.length)) { var oScript = document.createElement('script'); oScript.src = g_CSIncludes[g_CSCurrIdx][0]; oScript.type = 'text/javascript'; //oScript.onload = scriptLoaded; oScript.onload = function() { if ( ! oScript.onloadDone ) { oScript.onloadDone = true; g_CSLoading = false; g_CSCurrIdx++; if (g_CSIncludes[g_CSCurrIdx-1][1] == true) { self.scriptLoaded(); } else { self.include('', false); } } }; oScript.onreadystatechange = function() { if ( ( "loaded" === oScript.readyState || "complete" === oScript.readyState ) && ! oScript.onloadDone ) { oScript.onloadDone = true; g_CSLoading = false; g_CSCurrIdx++; if (g_CSIncludes[g_CSCurrIdx-1][1] == true) self.scriptLoaded(); else self.include('', false); } } // document.getElementsByTagName("head").item(0).appendChild(oScript); // g_CSLoading = true; } } } objcomSlider14665 = new comSlider14665(); objcomSlider14665.include('/Scripts/jquery/jquery-1.10.1.js', false); objcomSlider14665.include('/Scripts/jquery/jquery-ui-1.10.3.effects.js', true);