
jQuery.noConflict()
var SlideShow={bolDebug:false,csszindex:100,ajaxloadingmsg:"<br><br><br><div align=center><img src='images/shared/ani-busy.gif' /></div>",glide:function($,config,showpage,isprev){config.previousselected=config.selected
config.selected=parseInt(showpage)
if(config.selected>=config.$contentdivs.length){config.selected=0}
if(isprev=='tbd'){if(config.previousselected>config.selected){isprev='previous'}
else{isprev=''}}
var $target=config.$contentdivs.eq(config.selected)
if(config.$togglerdiv.attr('lastselected')==null||parseInt(config.$togglerdiv.attr('lastselected'))!=config.selected){config.$next.attr('loadpage',(config.selected<config.$contentdivs.length-1)?config.selected+1+'pg':0+'pg')
config.$prev.attr('loadpage',(config.selected==0)?config.$contentdivs.length-1+'pg':config.selected-1+'pg')
config.$playpause.attr('loadpage',(config.selected<config.$contentdivs.length-1)?config.selected+1+'pg':0+'pg')
SlideShow.transition($,config,$target,isprev)}},transition:function($,config,$target,isprev){var strImageSrc=SlideShow.getImageSrc($,config,$target.attr("ImageFileNo"))
if(config.ImageMapLoadedForPages.indexOf(","+config.selected+",")==-1){$target.children().each(function(){if($(this).attr("class")=="pageimage"){$(this).attr("src",strImageSrc)}})}
if(config.animation=="slide"){var startpoint=(isprev=="previous")?-config.startpoint:config.startpoint
if(config.leftortop!="left"){$target.css("left","0px")}
$target.css(config.leftortop,startpoint).css("zIndex",this.csszindex++)
var endpoint=(config.leftortop=="left")?{left:0}:{top:0}
$target.animate(endpoint,config.speed,function(){setTimeout(function(){SlideShow.preloadImage($,config)},config.speed)})}
else{$target.css("left","0px").css("top","0px").css("zIndex",this.csszindex++).hide().fadeIn(config.speed,function(){setTimeout(function(){SlideShow.preloadImage($,config)},config.speed)});}
setTimeout(function(){SlideShow.changeButtons($,config)},config.speed/2)
if(config.ImageMapLoadedForPages.indexOf(","+config.selected+",")==-1){var intImageFileNo=parseInt($target.attr("ImageFileNo"))
var intPageNo=parseInt($target.attr("PageNo"))
SlideShow.getImageMapInfo($,config,intImageFileNo,intPageNo,config.selected)}
config.$togglerdiv.attr('lastselected',config.selected+'pg')},preloadImage:function($,config){if(config.StartAuto==true){config.StartAuto=false
SlideShow.autorotate($,config)}
if(config.selected<config.$contentdivs.length-1){var $nextPage=config.$contentdivs.eq(config.selected+1)
var img=new Image()
img.src=SlideShow.getImageSrc($,config,$nextPage.attr("ImageFileNo"))}},getImageSrc:function($,config,ImageFileNo){var strImagePath="images/JPGS/"+config.SMID+"/Large/"+ImageFileNo+".jpg?r="+config.myrandomno
return strImagePath},getImageMapInfo:function($,config,myFileNo,myPageNo,selected){var strURL="SMImageMap.aspx?SMID="
strURL+=getParameterByName("SMID")
strURL+="&FileNo="+myFileNo
strURL+="&PageNo="+myPageNo
strURL+="&Width="+config.PageSizeX
strURL+="&Height="+config.PageSizeY
strURL+="&LinkToURL="+config.redirectURL
strURL+="&Rand="+config.myrandomno
$.ajax({url:strURL,error:function(ajaxrequest){SlideShow.HandleError("Fetching Image Map",ajaxrequest)},success:function(ImageMapContent){var $target=config.$contentdivs.eq(selected)
$target.append(ImageMapContent)
var targetDivID=$target.attr("ID")
$('#'+targetDivID+' map').each(function(){var intAreaCount=0;strMapID=$(this).attr("id");$('#'+strMapID+" area").each(function(){intAreaCount+=1;var oldcoords=$(this).attr("coords");var newcoords="";try{var newcoords=SlideShow.AdjustCoordsBasedOnRatio(config.SizePercent/100.0,oldcoords);$(this).attr("coords",newcoords);}
catch(e){}});});config.ImageMapLoadedForPages+=selected+","}})},HandleError:function(EventName,ajaxrequest){if(bolDebug==true){var strErrorMessage="Error "+EventName+".";strErrorMessage+="<br />Server Response: "+ajaxrequest.responseText;config.$glider.html(strErrorMessage);}},GetLeftTopofRect:function(coords){var myInts=new Array();var intCount=0;while((coords.indexOf(',')!=-1)&&(intCount<2)){onecoord=coords.substring(0,coords.indexOf(','));coords=coords.substring(coords.indexOf(',')+1);intoneCoord=parseInt(onecoord);myInts[intCount]=intoneCoord;intCount++;}
return myInts;},AdjustCoordsBasedOnRatio:function(dblratio,coords){var newcoords='';var onecoord='';var intoneCoord=0;var intoneCoordNew=0;var intCount=0;while(coords.indexOf(',')!=-1){onecoord=coords.substring(0,coords.indexOf(','));coords=coords.substring(coords.indexOf(',')+1);intoneCoord=parseInt(onecoord);intoneCoordNew=Math.floor(intoneCoord*dblratio);newcoords+=intoneCoordNew+',';intCount++;}
if(coords!=''){intoneCoord=parseInt(coords);intoneCoordNew=Math.floor(intoneCoord*dblratio);newcoords+=intoneCoordNew;}
return newcoords;},getremotecontent:function($,config){config.$playpause.css('visibility','hidden')
config.$prev.css('visibility','hidden')
config.$next.css('visibility','hidden')
config.$first.css('visibility','hidden')
config.$last.css('visibility','hidden')
this.setwidthandheight($,config)
config.$glider.html(this.ajaxloadingmsg)
var strURL="SMAdvContent.aspx?SMID="
strURL+=getParameterByName("SMID")
strURL+="&Randomize="+getParameterByName("Randomize")
strURL+="&NoOfPages="+getParameterByName("NoOfPages")
strURL+="&Rand="+config.myrandomno
$.ajax({url:strURL,error:function(ajaxrequest){SlideShow.HandleError("Fetching Content",ajaxrequest)},success:function(content){config.$glider.html(content)
SlideShow.DisplayButtons($,config)
SlideShow.setuptoggler($,config)}})},DisplayButtons:function($,config){config.controlbuttontotalwidth=0
if(config.buttonption==1){if(config.spreadcontrols==true){$("#ButtonContainer2").css('border','solid 0px #000000').css('left','0px').css("width",Math.floor(config.PageSizeX*config.SizePercent/100.0-10)+'px')}
if(config.showplaypausebutton==true){config.$playpause.css('visibility','visible')
config.controlbuttontotalwidth+=20
if(config.spreadcontrols==true){config.$playpause.css("position","absolute").css('top','0px').css('left',Math.floor(config.PageSizeX*config.SizePercent/200.0-5)+'px')}}
if(config.showpreviousnext==true){config.$prev.css('visibility','visible')
config.$next.css('visibility','visible')
config.controlbuttontotalwidth+=18*2
if(config.spreadcontrols==true){if(config.showfirstlast==true){config.$prev.css("position","absolute").css('top','0px').css('left','21px')
config.$next.css("position","absolute").css('top','0px').css('left',Math.floor(config.PageSizeX*config.SizePercent/100.0-46)+'px')}
else{config.$prev.css("position","absolute").css('top','0px').css('left','0px')
config.$next.css("position","absolute").css('top','0px').css('left',Math.floor(config.PageSizeX*config.SizePercent/100.0-26)+'px')}}}
else{config.$prev.css('width','0px')
config.$next.css('width','0px')}
if(config.showfirstlast==true){config.$first.css('visibility','visible')
config.$last.css('visibility','visible')
config.controlbuttontotalwidth+=27*2
if(config.spreadcontrols==true){config.$first.css("position","absolute").css('top','0px').css('left','0px')
config.$last.css("position","absolute").css('top','0px').css('left',Math.floor(config.PageSizeX*config.SizePercent/100.0-30)+'px')}}
else{config.$first.css('width','0px')
config.$last.css('width','0px')}}
else if(config.buttonption==2){if(config.noofbuttons>config.$glider.children().length){config.noofbuttons=config.$glider.children().length}
SlideShow.createNumberTOC($,config)}
SlideShow.setButtonLocations($,config)},setButtonLocations:function($,config){var intButtonSize=20;var strVertical=SlideShow.getVerticalString(config.buttonlocation)
var strHorizontal=SlideShow.getHorizontalString(config.buttonlocation)
var intHPosition=5
var intVPosition=5
var dblHeightRatio=1.6
if(config.buttonption==1){dblHeightRatio=1.2}
if(config.spreadcontrols==false){if(strHorizontal=="center"){strHorizontal="left"
if(config.buttonption==1){intHPosition=Math.floor((config.PageSizeX*config.SizePercent/100.0-config.controlbuttontotalwidth)/2.0)
if(config.controlbuttontotalwidth<30){intHPosition-=10}
else if(config.controlbuttontotalwidth<60){intHPosition-=5}}
else if(config.buttonption==2){intButtonSize=SlideShow.getNumberButtonSize(config.buttonsize)
var intInterval=SlideShow.getIntervalBetween2(config.buttonsize)
intHPosition=Math.floor((config.PageSizeX*config.SizePercent/100.0-intInterval-(config.noofbuttons*(intButtonSize+intInterval)+intInterval-2))/2.0)}}
else if(strHorizontal=="right"){intHPosition=10}}
else{strHorizontal="left"
intHPosition=5}
$("#"+config.togglerid).css({'color':'#'+config.numbercolors[1],'border':'solid 1px #'+config.numbercolors[1],'position':'absolute','height':intButtonSize*dblHeightRatio+'px','border':'solid 0px #777777','overflow':'hidden'}).css(strVertical,intVPosition+'px').css(strHorizontal,intHPosition+'px')},changeButtons:function($,config){if(config.buttonption==2){SlideShow.changeNumberButtons($,config)}},getNumberButtonSize:function(buttonsize){var intButtonSize=12+6*buttonsize;return intButtonSize;},getFontSize:function(buttonsize){var intfontSize=10+3*buttonsize;return intfontSize;},getPaddingTop:function(buttonsize){var intPaddingTop=3*buttonsize;return intPaddingTop;},getIntervalBetween2:function(buttonsize){var intInterval=3+2*buttonsize;return intInterval;},getVerticalString:function(buttonlocation){var strVertical="top";var intVertical=Math.floor((buttonlocation-1)/3);if(intVertical==1){strVertical="bottom";}
return strVertical;},getHorizontalString:function(buttonlocation){var strHorizontal="left";var intHorizontal=(buttonlocation-1)%3;if(intHorizontal==2){strHorizontal="right";}
else if(intHorizontal==1){strHorizontal="center";}
return strHorizontal;},createNumberTOC:function($,config){config.$glider=$("#"+config.gliderid);var intCount=1;config.$glider.children().each(function(){$("#ButtonContainer1").append("<div class='NumberButtons' loadpage='"+(intCount-1)+"'>"+intCount+"</div>");intCount++;})
var intButtonSize=SlideShow.getNumberButtonSize(config.buttonsize);var strfontoptions=config.numberfont.split("|");var intInterval=SlideShow.getIntervalBetween2(config.buttonsize);var strfontfamily=unescape(strfontoptions[0])
var strfontbold=strfontoptions[1]
if(strfontbold==""){strfontbold="normal"}
var strfontItalic=strfontoptions[2]
$("#ButtonContainer1").css({'position':'relative','width':config.noofbuttons*(intButtonSize+intInterval)+intInterval-2,'height':(intButtonSize+intInterval-2)+'px'});$("#glidecontenttoggler").css({'width':config.noofbuttons*(intButtonSize+intInterval)+intInterval-2,'height':(intButtonSize+intInterval-2)+'px','overflow':'hidden'});intCount=0;var intFontSize=SlideShow.getFontSize(config.buttonsize);var intPaddingTop=SlideShow.getPaddingTop(config.buttonsize);$("#ButtonContainer1 .NumberButtons").each(function(){$(this).css({'background-color':'#'+config.numbercolors[3],'color':'#'+config.numbercolors[1],'border':'solid 0px #'+config.numbercolors[1],'font-family':strfontfamily,'font-weight':strfontbold,'font-size':intFontSize+'px','width':intButtonSize+'px','height':intButtonSize+'px','text-align':"center",'float':'left','position':'absolute','left':intCount*(intButtonSize+intInterval)+intInterval-2+'px','top':'0px','opacity':'1.0','cursor':'pointer','padding-top':intPaddingTop+'px'});if(strfontItalic!=""){$(this).css('font-style',strfontItalic)}
intCount++;});$("#ButtonContainer1 .NumberButtons").bind("mouseover",function(){$("#ButtonContainer1 .NumberButtons").eq(config.previousmouseover).css({'opacity':'1.0','background-color':'#'+config.numbercolors[3],'color':'#'+config.numbercolors[1],'border':'solid 0px #'+config.numbercolors[1]});$(this).css({'opacity':'1.0','background-color':'#'+config.numbercolors[2],'color':'#'+config.numbercolors[0],'border':'solid 0px #'+config.numbercolors[0]});config.previousmouseover=$(this).attr('loadpage').replace('pg','');});$("#ButtonContainer1 .NumberButtons").bind("mouseout",function(){var $target=config.$contentdivs.eq(config.selected);var intPageToLoad=parseInt($(this).attr("loadpage"))+1;var intCurrentPageNo=$target.attr("PageNo");if(intPageToLoad!=intCurrentPageNo){$(this).css({'opacity':'1.0','background-color':'#'+config.numbercolors[3],'color':'#'+config.numbercolors[1],'border':'solid 0px #'+config.numbercolors[1]});}});config.previousmouseover=-1;config.previousselected=-1;config.firstbuttonindex=0;config.left=0;$("#ButtonContainer1 .NumberButtons").bind("click",function(){SlideShow.cancelautorotate(config.togglerid);config.StartAuto=true;SlideShow.glide($,config,this.getAttribute('loadpage'),'tbd');});},changeNumberButtons:function($,config){var $target=config.$contentdivs.eq(config.selected)
$("#ButtonContainer1 .NumberButtons").css({'opacity':'1.0','background-color':'#'+config.numbercolors[3],'color':'#'+config.numbercolors[1],'border':'solid 0px #'+config.numbercolors[1]});$("#ButtonContainer1 .NumberButtons").eq(config.selected).css({'opacity':'1.0','background-color':'#'+config.numbercolors[2],'color':'#'+config.numbercolors[0],'border':'solid 0px #'+config.numbercolors[0]});var intButtonSize=SlideShow.getNumberButtonSize(config.buttonsize);var intInterval=SlideShow.getIntervalBetween2(config.buttonsize);if(config.selected==0){$("#ButtonContainer1").css("left","0px");config.left=0;config.firstbuttonindex=0;}
else if((config.selected==config.firstbuttonindex)&&(config.selected<config.previousselected)){config.left+=intButtonSize+intInterval;$("#ButtonContainer1").css("left",config.left+"px");config.firstbuttonindex-=1;}
else if((config.firstbuttonindex>config.selected-1)&&(config.firstbuttonindex-config.noofbuttons>0)){config.left+=intButtonSize+intInterval;$("#ButtonContainer1").css("left",config.left+"px");config.firstbuttonindex-=1;}
else if((config.firstbuttonindex+config.noofbuttons<config.selected+2)&&(config.firstbuttonindex+config.noofbuttons<config.$glider.children().length)){config.left-=intButtonSize+intInterval;$("#ButtonContainer1").css("left",config.left+"px");config.firstbuttonindex+=1;}},aligncontents:function($,config){config.$contentdivs=$("#"+config.gliderid+" ."+config.contentclass)
config.$contentdivs.css(config.leftortop,config.startpoint).css({height:config.$glider.height(),visibility:'visible'})},setwidthandheight:function($,config){var contentwidth=config.PageSizeX*config.SizePercent/100
var contentheight=config.PageSizeY*config.SizePercent/100
var strbgcolor="#"+config.BGColor
if((strbgcolor=="")||(strbgcolor=="#")){strbgcolor="#ffffff"}
config.$contentdivs=$("#"+config.gliderid+" ."+config.contentclass)
$('.pageimage').css("border","solid 0px #ffffff").css("width",contentwidth+'px').css('height',contentheight+'px')
config.$contentdivs.css("background-color",strbgcolor)
config.$contentdivs.css("width",contentwidth+'px')
config.$wrapperdiv=$("#"+config.gliderid)
config.$wrapperdiv.css("width",contentwidth+'px').css("height",contentheight+'px')
$('body').css("background-color",strbgcolor);config.heightorwidth=(/up/i.test(config.direction))?config.$glider.height():config.$glider.width()
config.startpoint=(/^(left|up)/i.test(config.direction))?-config.heightorwidth:config.heightorwidth
config.$togglerdiv=$("#"+config.togglerid)
config.$togglerdiv.css(config.halign,config.hno+'px')
config.$togglerdiv.css(config.valign,config.vno+'px')},setuptoggler:function($,config){$('.pageimage').bind('click',function(e){if(config.redirectURL!=""){window.parent.location=unescape(config.redirectURL)}});this.setwidthandheight($,config)
this.aligncontents($,config)
config.$togglerdiv.hide()
var $firstandlast=$("#"+config.togglerid+" .last, #"+config.togglerid+" .first")
config.$first.attr('loadpage','0pg')
config.$last.attr('loadpage',(config.$contentdivs.length-1)+'pg')
$firstandlast.click(function(event){SlideShow.glide($,config,this.getAttribute('loadpage'),this.getAttribute('buttontype'))
event.preventDefault()})
var $nextandprev=$("#"+config.togglerid+" .next, #"+config.togglerid+" .prev")
$nextandprev.click(function(event){SlideShow.glide($,config,this.getAttribute('loadpage'),this.getAttribute('buttontype'))
event.preventDefault()})
var $playpause=$("#"+config.togglerid+" .playpause")
$playpause.click(function(event){if(config.autorotate==false||config.totalsteps==0||config.stepcount>=config.totalsteps){SlideShow.cancelautorotate(config.togglerid)
config.autorotateconfig[0]=getIntParameterByName("Interval",config.autorotateconfig[0],true)
config.autorotateconfig[1]=getIntParameterByName("NoOfCycles",config.autorotateconfig[1],true)
config.autorotate=true
config.stepcount=0
config.totalsteps=config.$contentdivs.length*config.autorotateconfig[1]
SlideShow.autorotate($,config)
$("#imgPlayPause").attr("src","images/shared/pause.png").attr("alt","pause")}
else{config.autorotate=false
config.totalsteps=0;SlideShow.cancelautorotate(config.togglerid)
$("#imgPlayPause").attr("src","images/shared/play.png").attr("alt"," play ")}}),config.$togglerdiv.fadeIn(600,function(){SlideShow.glide($,config,config.selected)
if(config.autorotate==true){config.stepcount=0
config.totalsteps=config.$contentdivs.length*config.autorotateconfig[1]-1
SlideShow.autorotate($,config)}
else{config.$playpauseimage=config.$playpause.find('.imagebutton').attr("src","images/shared/play.png").attr("alt"," play ")}})},autorotate:function($,config){var rotatespeed=config.speed+config.autorotateconfig[0]
window[config.togglerid+"timer"]=setInterval(function(){if(config.totalsteps>0&&config.stepcount>=config.totalsteps){clearInterval(window[config.togglerid+"timer"])
config.$playpauseimage=config.$playpause.find('.imagebutton').attr("src","images/shared/play.png").attr("alt"," play ")}
else{var intPage=parseInt($('#btnNext').attr('loadpage'))
var $target=config.$contentdivs.eq(intPage)
var strImageSrc=SlideShow.getImageSrc($,config,$target.attr("ImageFileNo"))
var img=new Image()
img.src=strImageSrc
config.WaitingTime+=config.autorotateconfig[0]
var bolWaitedLongEnough=((config.ImageMapLoadedForPages.indexOf(","+intPage+",")!=-1)||(config.ImageMapLoadedForPages.indexOf(","+intPage+",")==-1)&&(config.WaitingTime>=3000))
if((img.complete==true)||(bolWaitedLongEnough==true)){config.WaitingTime=0
config.$next.triggerHandler('click')
config.stepcount++}}},rotatespeed)},cancelautorotate:function(togglerid){if(window[togglerid+"timer"]){clearInterval(window[togglerid+"timer"])}},getCookie:function(Name){var re=new RegExp(Name+"=[^;]+","i")
if(document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1]
return null},setCookie:function(name,value){document.cookie=name+"="+value},init:function(config){jQuery(document).ready(function($){config.WaitingTime=0
config.SMID=getIntParameterByName("SMID",-1,true)
config.autorotateconfig[0]=getIntParameterByName("Interval",config.autorotateconfig[0],true)
config.autorotateconfig[1]=getIntParameterByName("NoOfCycles",config.autorotateconfig[1],true)
config.speed=getIntParameterByName("Speed",config.speed,true)
config.animation=getParameterByNameWValueRange("Animation",",fade,slide,")
config.BGColor=getParameterByName("BGColor")
config.direction=getParameterByNameWValueRange("SlidingDirection",",updown,downup,leftright,rightleft,","rightleft")
config.autorotate=getBoolParameterByName("AutoRotate",true)
config.SizePercent=getIntParameterByName("SizePercent",100,true)
config.PageSizeX=getIntParameterByName("PageSizeX",445,true)
config.PageSizeY=getIntParameterByName("PageSizeY",576,true)
config.showplaypausebutton=getBoolParameterByName("ShowButton",false)
config.redirectURL=getParameterByName("LinkToURL")
config.showpreviousnext=getBoolParameterByName("PreNext",false)
config.showfirstlast=getBoolParameterByName("Firla",false)
config.buttonption=getIntParameterByName("BtnOpt",0,true)
config.buttonsize=getIntParameterByName("BtnSize",0,true)
config.buttonlocation=getIntParameterByName("BtnLoc",1,true)
config.numberfont=getParameterByName("NoFont")
config.numbercolors=getNumberColors("NoColor","000000,777777,ADCBEF,FFFFFF")
config.noofbuttons=getIntParameterByName("NoOfBtns",6,true)
config.spreadcontrols=getBoolParameterByName("Spread",false)
config.myrandomno=getParameterByName("Rand")
config.StartAuto=false
config.$glider=$("#"+config.gliderid)
config.$togglerdiv=$("#"+config.togglerid)
config.$next=config.$togglerdiv.find('.next')
config.$prev=config.$togglerdiv.find('.prev')
config.$playpause=config.$togglerdiv.find('.playpause')
config.$playpauseimage=config.$playpause.find('.imagebutton')
config.$last=config.$togglerdiv.find('.last')
config.$first=config.$togglerdiv.find('.first')
config.$first.attr('buttontype','previous')
config.$prev.attr('buttontype','previous')
var selected=(config.persiststate)?SlideShow.getCookie(config.gliderid):config.selected
config.selected=(isNaN(parseInt(selected)))?config.selected:selected
config.leftortop=(/up/i.test(config.direction))?"top":"left"
config.ImageMapLoadedForPages=",";SlideShow.getremotecontent($,config)
$(window).bind('unload',function(){config.$togglerdiv.unbind('click')
config.$next.unbind('click')
config.$prev.unbind('click')
config.$last.unbind('click')
config.$first.unbind('click')
config.$playpause.unbind('click')
if(config.persiststate)
SlideShow.setCookie(config.gliderid,config.$togglerdiv.attr('lastselected'))
config=null})})}}
function JQEventLog(strURL){jQuery.ajax({url:strURL,error:function(ajaxrequest){SlideShow.HandleError("Logging Event",ajaxrequest)},success:function(strResponse){}})}
function showexternal(externalurl,eventlogurl){var property="";var bolShowLinkInNewWindow=getBoolParameterByName("ShowLinkInNewWindow",false);if((externalurl.indexOf('http://')==-1)&&(externalurl.indexOf('https://')==-1)){externalurl='http://'+externalurl;}
if((window.parent!=null)&&(bolShowLinkInNewWindow==false)){window.parent.location=unescape(externalurl);}
else{var property="resizable=1, scrollbars=1, width=1000, height=760";var newwin=window.open(externalurl,'',property);}
JQEventLog(eventlogurl);}
function showvideo(videourl,width,height,name,eventlogurl){if((videourl.indexOf('http://')==-1)&&(videourl.indexOf('https://')==-1)){videourl='http://'+videourl;}
JQEventLog(eventlogurl+"&ShowExternal=true");jQuery('#basic-modal-content').css("padding","0px");jQuery('#iframevideo').css("width",width+"px").css("height",height+"px").attr("src",videourl);jQuery('#basic-modal-content').modal();jQuery('#simplemodal-container').css('background-color','#333333');}
function getParameterByName(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null){return"";}
else{return results[1];}}
function getBoolParameterByName(name,defaultvalue){var strvalue=getParameterByName(name).toLowerCase();var bolvalue=defaultvalue;if(strvalue=="true"){bolvalue=true;}
else if(strvalue=="false"){bolvalue=false;}
return bolvalue;}
function getNumberColors(name,defaultvalue){var strNumberColor=getParameterByNameWDefault(name,defaultvalue);var strNumberColorList=strNumberColor.split(",");var strDefaultColorList=defaultvalue.split(",");var intLength=strNumberColorList.length;while(intLength<4){strNumberColorList[intLength]=strDefaultColorList[intLength]
intLength++;}
return strNumberColorList;}
function getParameterByNameWDefault(name,defaultvalue){var strvalue=getParameterByName(name).toLowerCase();if(strvalue==""){strvalue=defaultvalue;}
return strvalue;}
function getParameterByNameWValueRange(name,valuerange,defaultvalue){var strvalue=getParameterByName(name).toLowerCase();if(valuerange.indexOf(","+strvalue+",")==-1){strvalue=defaultvalue;}
return strvalue;}
function getIntParameterByName(name,defaultvalue,bolmustpositive){var intvalue=defaultvalue;var strvalue=getParameterByName(name);if(strvalue!=""){try{intvalue=parseInt(strvalue);}
catch(ex){}}
if((bolmustpositive==true)&&(intvalue<0))intvalue=defaultvalue;return intvalue;}
