function DropShadowInterface(color,xOffset,yOffset,blur,opacity,xShrink,yShrink){this.dropShadowId=null;this.elemId=null;this.color=null;this.xOffset=null;this.yOffset=null;this.xShrink=null;this.yShrink=null;this.blur=null;this.opacity=null;this.shadowStyle=null;this.images=new Array;this.draw=DropShadowInterface_Draw;this.erase=DropShadowInterface_Erase;this.init=DropShadowInterface_Init;this.setBlur=DropShadowInterface_SetBlur;this.alignElement=DropShadowInterface_AlignElement;return this;}
DropShadowInterface.prototype=new Interface;DropShadowInterface.prototype.constructor=DropShadowInterface;DropShadowInterface.superclass=Interface.prototype;DropShadowInterface.styles={DefaultMenu:{color:'rgb(0,0,0)',xOffset:10,yOffset:15,blur:{iRadius:12,iSigma:20},opacity:.2,xShrink:16,yShrink:20},Default:{color:'rgb(0,0,0)',xOffset:17,yOffset:17,blur:{iRadius:20,iSigma:20},opacity:.2,xShrink:29,yShrink:24},IEDefault:{color:'rgb(0,0,0)',xOffset:7,yOffset:10,blur:{iRadius:10,iSigma:20},opacity:.2,xShrink:9,yShrink:10},CheckAll:{color:'rgb(0,0,0)',xOffset:7,yOffset:7,blur:{iRadius:10,iSigma:10},opacity:.2,xShrink:9,yShrink:4},oldIe:{color:'rgb(0,0,0)',xOffset:7,yOffset:10,blur:{iRadius:10,iSigma:20},opacity:.2,xShrink:9,yShrink:10}};DropShadowInterface.engineUrl='/gfx/gradient.php';DropShadowInterface.imgIds={top:0,left:1,bottom:2,right:3,topLeft:4,bottomLeft:5,bottomRight:6,topRight:7};function DropShadowInterface_Init(color,xOffset,yOffset,blur,opacity,xShrink,yShrink){if(!this.shadowStyle&&DomUtils.browser.isIE())this.shadowStyle='IEDefault';else if(!this.shadowStyle)this.shadowStyle='Default';var shadowStyle=DropShadowInterface.styles[this.shadowStyle];this.color=(color)?color:shadowStyle.color;this.xOffset=!isNaN(xOffset)?xOffset:shadowStyle.xOffset;this.yOffset=!isNaN(yOffset)?yOffset:shadowStyle.yOffset;this.blur=isString(blur)?blur:shadowStyle.blur;this.opacity=isFloat(opacity)?opacity:shadowStyle.opacity;this.xShrink=!isNaN(xShrink)?xShrink:shadowStyle.xShrink;this.yShrink=!isNaN(yShrink)?yShrink:shadowStyle.yShrink;this.hexColor='';this.rgbColor='';var rgbRegex=/^rgb\(\s?([0-9]{1,3})\s?\,\s?([0-9]{1,3})\s?\,\s?([0-9]{1,3})\s?\)/;var hexRegex=/^\#?[0-9A-Fa-f]{3}$|\#[0-9A-Fa-f]{6}$/;if(hexRegex.test(this.color)){var triplets=new Array;if(this.color.length>4){this.hexColor=this.color;for(var start=1;start+2<=this.color.length;start+=2)triplets[triplets.length]=this.color.substr(start,2);for(var i=0;i<triplets.length;i++)triplets[i]=parseInt(triplets[i],16);this.rgbColor=triplets.join(',');}else if(this.color.length==4){for(var start=1;start+1<=this.color.length;start++)triplets[triplets.length]=this.color.substr(start,1)+this.color.substr(start,1);this.hexColor='#'+triplets.join('');for(var i=0;i<triplets.length;i++)triplets[i]=parseInt(triplets[i],16);this.rgbColor=triplets.join(',');}else throw new Error('No valid color setting defined! color: '+this.color);}else{var matches=this.color.match(rgbRegex);if(matches&&matches.length>1){matches.shift();for(var i=0;i<matches.length;i++){if(parseInt(matches[i])>255)throw new Error('Invalid RGB color specified: '+this.color);}
this.rgbColor=matches.join(',');}else throw new Error('No valid color setting defined! color: '+this.color);}
if(isString(this.blur)){var radius=parseInt(this.blur);var sigma=0;if(this.blur.indexOf('x')>0)sigma=parseInt(this.blur.split('x')[1]);this.setBlur(radius,sigma);}
this.images=new Array;this.images[DropShadowInterface.imgIds.top]=DropShadowInterface.engineUrl+'?grad=linear&dir=btt&height='+this.blur.iRadius+
'&width='+this.blur.iRadius+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma+'&opacity='+this.opacity;this.images[DropShadowInterface.imgIds.bottom]=DropShadowInterface.engineUrl+'?grad=linear&dir=ttb&height='+this.blur.iRadius+
'&width='+this.blur.iRadius+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma+'&opacity='+this.opacity;this.images[DropShadowInterface.imgIds.left]=DropShadowInterface.engineUrl+'?grad=linear&dir=rtl&height='+this.blur.iRadius+
'&width='+this.blur.iRadius+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma+'&opacity='+this.opacity;this.images[DropShadowInterface.imgIds.right]=DropShadowInterface.engineUrl+'?grad=linear&dir=ltr&height='+this.blur.iRadius+
'&width='+this.blur.iRadius+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma+'&opacity='+this.opacity;this.images[DropShadowInterface.imgIds.bottomRight]=DropShadowInterface.engineUrl+'?grad=radial&radius='+(this.blur.iRadius*2)+
'&height='+this.blur.iRadius+'&width='+this.blur.iRadius+'&opacity='+this.opacity+
'&x=0&y=0'+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma;this.images[DropShadowInterface.imgIds.topRight]=DropShadowInterface.engineUrl+'?grad=radial&radius='+(this.blur.iRadius*2)+
'&height='+this.blur.iRadius+'&width='+this.blur.iRadius+'&opacity='+this.opacity+
'&x=0&y='+(this.blur.iRadius+1)+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma;this.images[DropShadowInterface.imgIds.bottomLeft]=DropShadowInterface.engineUrl+'?grad=radial&radius='+(this.blur.iRadius*2)+
'&height='+this.blur.iRadius+'&width='+this.blur.iRadius+'&opacity='+this.opacity+
'&x='+(this.blur.iRadius+1)+'&y=0'+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma;this.images[DropShadowInterface.imgIds.topLeft]=DropShadowInterface.engineUrl+'?grad=radial&radius='+(this.blur.iRadius*2)+
'&height='+this.blur.iRadius+'&width='+this.blur.iRadius+'&opacity='+this.opacity+
'&x='+(this.blur.iRadius+1)+'&y='+(this.blur.iRadius+1)+'&color='+this.rgbColor+'&gaussian='+this.blur.iRadius+'x'+this.blur.iSigma;if(typeof(window.preloadImage)=='function'){for(i=0;i<this.images.length;i++){util.resourceManager.get(this.images[i]);}}
}
function DropShadowInterface_Draw(){var opacity=this.opacity;var dropShadow=document.getElementById(this.dropShadowId);if(dropShadow){DomUtils.removeElement(dropShadow);dropShadow=null;}
var elem=document.getElementById(this.elemId);if(elem){var zIndex=parseInt(DomUtils.getZIndex(elem))-2;this.dropShadowId=this.id+'_DropShadow';var dropShadow=elem.cloneNode(false);dropShadow.id=this.dropShadowId;dropShadow.style.visibility='hidden';dropShadow.style.zIndex=zIndex;dropShadow.className='';dropShadow.style.position='absolute';dropShadow.style.backgroundColor='transparent';dropShadow.style.border='none';dropShadow.style.left=parseInt(DomUtils.getElementLeft(elem))+'px';dropShadow.style.top=parseInt(DomUtils.getElementTop(elem))+'px';dropShadow.xOffset=parseInt(this.xOffset);dropShadow.yOffset=parseInt(this.yOffset);dropShadow.overflow='visible !important';document.getElementsByTagName('body')[0].appendChild(dropShadow);if(this.xShrink){dropShadow.style.width=parseInt(parseInt(DomUtils.getElementWidth(elem))+(parseInt(this.xShrink)/2))+'px';}
if(this.yShrink){dropShadow.style.height=parseInt(parseInt(DomUtils.getElementHeight(elem))+(parseInt(this.yShrink)/2))+'px';}
if(DomUtils.browser.isIE()){var eStyle=DomUtils.getCurrentStyle(elem);pLeft=parseInt(eStyle.paddingLeft);pRight=parseInt(eStyle.paddingRight);pTop=parseInt(eStyle.paddingTop);pBottom=parseInt(eStyle.paddingBottom);pWidth=parseInt((!isNaN(pLeft)?pLeft:0)+(!isNaN(pRight)?pRight:0));pHeight=parseInt((!isNaN(pTop)?pTop:0)+(!isNaN(pBottom)?pBottom:0));}else{pHeight=0;pWidth=0;}
var img;var shadow=document.createElement('div');shadow.id=this.id+'_DropShadow_Main';shadow.style.position='absolute';shadow.style.width=parseInt(parseInt(DomUtils.getElementWidth(elem))-parseInt(this.xShrink))+'px';shadow.style.height=parseInt(parseInt(DomUtils.getElementHeight(elem))-parseInt(this.yShrink))+'px';shadow.style.left=parseInt(this.xOffset)+'px';shadow.style.top=parseInt(this.yOffset)+'px';shadow.style.border='none';shadow.style.backgroundColor='rgb('+this.rgbColor+')';shadow.style.zIndex=zIndex;if(DomUtils.browser.isIE())shadow.style.filter+='progid:DXImageTransform.Microsoft.Alpha(opacity='+(this.opacity*100)+')';else shadow.style.MozOpacity=this.opacity;dropShadow.appendChild(shadow);var bottomEdge=document.createElement('div');bottomEdge.id=this.id+'_DropShadow_Bottom';bottomEdge.className='shadow';bottomEdge.style.position='absolute';bottomEdge.style.top=parseInt(parseInt(DomUtils.getElementHeight(shadow))+parseInt(this.yOffset))+'px';bottomEdge.style.left=parseInt(this.xOffset)+'px';bottomEdge.style.height=parseInt(this.blur.iRadius)+'px';bottomEdge.style.width=parseInt(DomUtils.getElementWidth(shadow))+'px';bottomEdge.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.bottom]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(DomUtils.getElementWidth(shadow));img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);bottomEdge.appendChild(img);dropShadow.appendChild(bottomEdge);var rightEdge=document.createElement('div');rightEdge.id=this.id+'_DropShadow_Right';rightEdge.className='shadow';rightEdge.style.position='absolute';rightEdge.style.left=parseInt(parseInt(DomUtils.getElementWidth(shadow))+parseInt(this.xOffset))+'px';rightEdge.style.top=parseInt(this.yOffset)+'px';rightEdge.style.height=parseInt(DomUtils.getElementHeight(shadow))+'px';rightEdge.style.width=parseInt(this.blur.iRadius)+'px';rightEdge.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.right]);img.height=parseInt(DomUtils.getElementHeight(shadow));img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);rightEdge.appendChild(img);dropShadow.appendChild(rightEdge);var leftEdge=document.createElement('div');leftEdge.id=this.id+'_DropShadow_Left';leftEdge.className='shadow';leftEdge.style.position='absolute';leftEdge.style.left=parseInt(parseInt(this.xOffset)-parseInt(this.blur.iRadius))+'px';leftEdge.style.top=parseInt(this.yOffset)+'px';leftEdge.style.height=parseInt(DomUtils.getElementHeight(shadow))+'px';leftEdge.style.width=parseInt(this.blur.iRadius)+'px';leftEdge.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.left]);img.height=parseInt(DomUtils.getElementHeight(shadow));img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);leftEdge.appendChild(img);dropShadow.appendChild(leftEdge);var topEdge=document.createElement('div');topEdge.id=this.id+'_DropShadow_Top';topEdge.className='shadow';topEdge.style.position='absolute';topEdge.style.left=parseInt(this.xOffset)+'px';topEdge.style.top=parseInt(parseInt(this.yOffset)-parseInt(this.blur.iRadius))+'px';topEdge.style.height=parseInt(this.blur.iRadius)+'px';topEdge.style.width=parseInt(DomUtils.getElementWidth(shadow))+'px';topEdge.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.top]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(DomUtils.getElementWidth(shadow));img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);topEdge.appendChild(img);dropShadow.appendChild(topEdge);var brCorner=document.createElement('div');brCorner.id=this.id+'_DropShadow_BottomRightCorner';brCorner.className='shadow';brCorner.style.position='absolute';brCorner.style.top=parseInt(parseInt(DomUtils.getElementHeight(shadow))+parseInt(this.yOffset))+'px';brCorner.style.left=parseInt(parseInt(DomUtils.getElementWidth(shadow))+parseInt(this.xOffset))+'px';brCorner.style.height=parseInt(this.blur.iRadius)+'px';brCorner.style.width=parseInt(this.blur.iRadius)+'px';brCorner.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.bottomRight]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);brCorner.appendChild(img);dropShadow.appendChild(brCorner);var trCorner=document.createElement('div');trCorner.id=this.id+'_DropShadow_TopRightCorner';trCorner.className='shadow';trCorner.style.position='absolute';trCorner.style.left=parseInt(parseInt(DomUtils.getElementWidth(shadow))+parseInt(this.xOffset))+'px';trCorner.style.top=parseInt(parseInt(this.yOffset)-parseInt(this.blur.iRadius))+'px';trCorner.style.height=parseInt(this.blur.iRadius)+'px';trCorner.style.width=parseInt(this.blur.iRadius)+'px';trCorner.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.topRight]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);trCorner.appendChild(img);dropShadow.appendChild(trCorner);var blCorner=document.createElement('div');blCorner.id=this.id+'_DropShadow_BottomLeftCorner';blCorner.className='shadow';blCorner.style.position='absolute';blCorner.style.left=parseInt(parseInt(this.xOffset)-parseInt(this.blur.iRadius))+'px';blCorner.style.top=parseInt(parseInt(DomUtils.getElementHeight(shadow))+parseInt(this.yOffset))+'px';blCorner.style.height=parseInt(this.blur.iRadius)+'px';blCorner.style.width=parseInt(this.blur.iRadius)+'px';blCorner.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.bottomLeft]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);blCorner.appendChild(img);dropShadow.appendChild(blCorner);var tlCorner=document.createElement('div');tlCorner.id=this.id+'_DropShadow_TopLeftCorner';tlCorner.className='shadow';tlCorner.style.position='absolute';tlCorner.style.left=parseInt(parseInt(this.xOffset)-parseInt(this.blur.iRadius))+'px';tlCorner.style.top=parseInt(parseInt(this.yOffset)-parseInt(this.blur.iRadius))+'px';tlCorner.style.height=parseInt(this.blur.iRadius)+'px';tlCorner.style.width=parseInt(this.blur.iRadius)+'px';tlCorner.style.zIndex=zIndex;img=document.createElement('img');img.src=util.resourceManager.get(this.images[DropShadowInterface.imgIds.topLeft]);img.height=parseInt(this.blur.iRadius);img.width=parseInt(this.blur.iRadius);img.style.position='absolute';img.style.left='0px';img.style.top='0px';DropShadowInterface_FixPNG(img);tlCorner.appendChild(img);dropShadow.appendChild(tlCorner);dropShadow.style.visibility=DomUtils.getCurrentStyle(elem).visibility;}else{throw new Error('unable to find content element');}
}
function DropShadowInterface_Erase(){var dropShadow=document.getElementById(this.dropShadowId);if(dropShadow)DomUtils.removeElement(dropShadow);dropShadow=null;}
function DropShadowInterface_AlignElement(pos){var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);var dropShadow=document.getElementById(this.dropShadowId);if(!dropShadow)throw new Error('Unable to find drop shadow element: '+this.dropShadowId);dropShadow.style.position='absolute';dropShadow.style.left=DomUtils.getElementLeft(elem)+'px';dropShadow.style.top=DomUtils.getElementTop(elem)+'px';dropShadow=null;elem=null;}
function DropShadowInterface_SetBlur(radius,sigma){this.blur={iRadius:radius,iSigma:sigma};}
function DropShadowInterface_FixPNG(img){if(DomUtils.browser.isIE()){var arVersion=navigator.appVersion.split("MSIE");var version=0.0;if(arVersion&&arVersion.length>1)version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body.filters)){var imgID=(img.id)?"id='"+img.id+"' ":"";var imgClass=(img.className)?"class='"+img.className+"' ":"";var imgTitle=(img.title)?"title='"+img.title+"' ":"title='"+img.alt+"' ";var imgStyle="display:inline-block;";if(img&&img.style){imgStyle+=img.style.cssText||'';img.style.cssText="display: none";}
var strNewHTML="<span "+imgID+imgClass+imgTitle
+" style=\""+"width:"+img.width
+"px; height:"+img.height
+"px;"+imgStyle+";"
+"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+img.src+"\', sizingMethod='scale');\"></span>";img.src="";img.outerHTML=strNewHTML;}}}
function PopupInterface(){this.elemId=null;this.visible=false;this.linked=new Array;this.hide=PopupInterface_Hide;this.show=PopupInterface_Show;this.toggle=PopupInterface_Toggle;}
PopupInterface.prototype=new Interface;PopupInterface.prototype.constructor=PopupInterface;PopupInterface.superclass=Interface.prototype;function PopupInterface_Hide(){this.visible=false;var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);elem.style.visibility='hidden';elem.style.left='0px';elem.style.top='0px';for(var i=0;i<this.linked.length;i++){var elem=document.getElementById(this.linked[i]);elem.style.visibility='hidden';elem.style.left='0px';elem.style.top='0px';}
return true;}
function PopupInterface_Show(){this.visible=true;if(document.getElementById(this.elemId))document.getElementById(this.elemId).style.visibility='visible';for(var i=0;i<this.linked.length;i++)document.getElementById(this.linked[i]).style.visibility='visible';return true;}
function PopupInterface_Toggle(){if(this.visible)return this.hide();else return this.show();}
function DelayedPopupInterface(){this.elemId=null;this.visible=false;this.linked=new Array;this.timer=null;this.delay=null;this.hide=DelayedPopupInterface_Hide;this.show=DelayedPopupInterface_Show;this.toggle=PopupInterface_Toggle;this.cancelTimer=DelayedPopupInterface_CancelTimer;this.implement(PopupInterface);return this;}
DelayedPopupInterface.prototype=new PopupInterface;DelayedPopupInterface.prototype.constructor=DelayedPopupInterface;DelayedPopupInterface.superclass=PopupInterface.prototype;function DelayedPopupInterface_Hide(){this.cancelTimer();var obj=this;this.timer=setTimeout(function(){PopupInterface_Hide.call(obj);obj.timer=null;},this.delay);return true;}
function DelayedPopupInterface_Show(){this.cancelTimer();var obj=this;this.timer=setTimeout(function(){PopupInterface_Show.call(obj);obj.timer=null;},this.delay);return true;}
function DelayedPopupInterface_CancelTimer(){if(this.timer){clearTimeout(this.timer);this.timer=null;}
return true;}
function RoundedCornersInterface(){this.elemId=null;this.cornerStyle=null;this.init=RoundedCornersInterface_Init;this.draw=RoundedCornersInterface_Draw;this.erase=RoundedCornersInterface_Erase;this.cornersDrawn=false;this.init();}
RoundedCornersInterface.prototype=new Interface;RoundedCornersInterface.prototype.constructor=RoundedCornersInterface;RoundedCornersInterface.superclass=Interface.prototype;RoundedCornersInterface.styles={Default:{images:{tr:{src:'http://i.pgcdn.com/images/balloon/top_right_6x6.gif',width:6,height:6},tl:{src:'http://i.pgcdn.com/images/balloon/top_left_6x6.gif',width:6,height:6},bl:{src:'http://i.pgcdn.com/images/balloon/bottom_left_6x6.gif',width:6,height:6},br:{src:'http://i.pgcdn.com/images/balloon/bottom_right_6x6.gif',width:6,height:6}}}};RoundedCornersInterface.settings={style:'Default'};RoundedCornersInterface.imgIds={tr:0,tl:1,bl:2,br:3};function RoundedCornersInterface_Init(){var style=RoundedCornersInterface.styles[RoundedCornersInterface.settings.style];if(typeof(window.preloadImage)=='function'){window.preloadImage(style.images.tr.src,style.images.tr.width,style.images.tr.height);window.preloadImage(style.images.tl.src,style.images.tl.width,style.images.tl.height);window.preloadImage(style.images.bl.src,style.images.bl.width,style.images.bl.height);window.preloadImage(style.images.br.src,style.images.br.width,style.images.br.height);}}
function RoundedCornersInterface_Draw(){if(this.cornersDrawn){RoundedCornersInterface_Erase.call(this);}
var elem=document.getElementById(this.elemId);if(elem){var style=RoundedCornersInterface.styles[RoundedCornersInterface.settings.style];var div=document.createElement('div');div.id='roundedCorners_Background';div.style.position='absolute';div.style.left=style.images.tl.width+'px';div.style.top=style.images.tl.height+'px';var eHeight=DomUtils.getElementHeight(elem);var tlHeight=style.images.tl.height;var blHeight=style.images.bl.height;var eWidth=DomUtils.getElementWidth(elem);var tlWidth=style.images.tl.width;var blWidth=style.images.bl.width;div.style.height=(parseInt(eHeight)-tlHeight-blHeight)+'px';div.style.width=(parseInt(eWidth)-tlWidth-blWidth)+'px';div.style.backgroundColor='#ffffff';div.style.zIndex='-1';elem.appendChild(div);elem.style.backgroundColor='transparent';div=document.createElement('div');div.id='roundedCorners_BottomEdge';div.style.position='absolute';div.style.left=style.images.bl.width+'px';div.style.top=(parseInt(DomUtils.getElementHeight(elem))-style.images.bl.height)+'px';div.style.height=(style.images.bl.height)+'px';div.style.width=(parseInt(DomUtils.getElementWidth(elem))-style.images.bl.width-style.images.br.width)+'px';div.style.borderBottom='1px solid #999999';div.style.backgroundColor='#ffffff';div.style.overflow='hidden';elem.appendChild(div);div=document.createElement('div');div.id='roundedCorners_TopEdge';div.style.position='absolute';div.style.left=style.images.tl.width+'px';div.style.top='0px';div.style.height=(style.images.tl.height)+'px';div.style.width=(parseInt(DomUtils.getElementWidth(elem))-style.images.tl.width-style.images.tr.width)+'px';div.style.borderTop='1px solid #999999';div.style.backgroundColor='#ffffff';div.style.overflow='hidden';elem.appendChild(div);div=document.createElement('div');div.id='roundedCorners_LeftEdge';div.style.position='absolute';div.style.left='0px';div.style.top=style.images.tl.height+'px';div.style.width=(style.images.tl.width)+'px';div.style.height=(parseInt(DomUtils.getElementHeight(elem))-style.images.tl.height-style.images.bl.height)+'px';div.style.borderLeft='1px solid #999999';div.style.backgroundColor='#ffffff';div.style.overflow='hidden';elem.appendChild(div);div=document.createElement('div');div.id='roundedCorners_RightEdge';div.style.position='absolute';div.style.left=(parseInt(DomUtils.getElementWidth(elem))-style.images.tr.width)+'px';div.style.top=style.images.tr.height+'px';div.style.width=(style.images.tr.width)+'px';div.style.height=(parseInt(DomUtils.getElementHeight(elem))-style.images.tr.height-style.images.br.height)+'px';div.style.borderRight='1px solid #999999';div.style.backgroundColor='#ffffff';div.style.overflow='hidden';elem.appendChild(div);var img=document.createElement('img');img.id='roundedCorners_TopRightCorner';img.src=style.images.tr.src;img.height=style.images.tr.height;img.width=style.images.tr.width;img.border=0;img.style.position='absolute';img.style.left=parseInt(parseInt(DomUtils.getElementWidth(elem))-(img.width))+'px';img.style.top='0px';elem.appendChild(img);var img=document.createElement('img');img.id='roundedCorners_TopLeftCorner';img.src=style.images.tl.src;img.height=style.images.tl.height;img.width=style.images.tl.width;img.border=0;img.style.position='absolute';img.style.left='0px';img.style.top='0px';elem.appendChild(img);var img=document.createElement('img');img.id='roundedCorners_BottomLeftCorner';img.src=style.images.bl.src;img.height=style.images.bl.height;img.width=style.images.bl.width;img.border=0;img.style.position='absolute';img.style.left='0px';img.style.top=parseInt(parseInt(DomUtils.getElementHeight(elem))-parseInt(img.height))+'px';elem.appendChild(img);var img=document.createElement('img');img.id='roundedCorners_BottomRightCorner';img.src=style.images.br.src;img.height=style.images.br.height;img.width=style.images.br.width;img.border=0;img.style.position='absolute';img.style.left=parseInt(parseInt(DomUtils.getElementWidth(elem))-(img.width))+'px';img.style.top=parseInt(parseInt(DomUtils.getElementHeight(elem))-(img.height))+'px';elem.appendChild(img);this.cornersDrawn=true;}
}
function RoundedCornersInterface_Erase(){var elem=document.getElementById(this.elemId);if(elem.hasChildNodes()){for(var i=elem.childNodes.length;i>0;i--){var nodeId=elem.childNodes[i-1].id;var eq='!=';var idPre='roundedCorners_';if(nodeId&&nodeId.substr(0,idPre.length)==idPre){eq='==';DomUtils.removeElement(elem.childNodes[i-1]);}
}}
this.cornersDrawn=false;}
function ResourceManager(){var resourceManager=this;this.preloadedImages=new Array;window.preloadImage=ResourceManager_PreloadImage;window.getImage=ResourceManager_GetImage;window.getImageSrc=ResourceManager_GetImageSrc;window.swapImageSrc=ResourceManager_SwapImageSrc;return this;}
function ResourceManager_PreloadImage(url,width,height){if(!window.resourceManager.preloadedImages)window.resourceManager.preloadedImages=new Array;if(!window.resourceManager.preloadedImages[url]){var image=new Image(width,height);image.src=url;window.resourceManager.preloadedImages[url]=image;}
return window.resourceManager.preloadedImages[url];}
function ResourceManager_GetImage(url,width,height){return window.preloadImage(url,width,height);}
function ResourceManager_GetImageSrc(url){return window.getImage(url).src;}
function ResourceManager_SwapImageSrc(imgElem,url){if(imgElem&&imgElem.nodeType=='IMG'){imgElem.oldSrc=imgElem.src;imgElem.src=window.getImageSrc(url);}}
window.resourceManager=new ResourceManager();
function ReportReviewPopup(anchor){this.elemId=null;this.calloutId=null;this.calloutPadding=0;this.dropShadowId=null;this.color=null;this.xOffset=null;this.yOffset=null;this.blur={iRadius:null,iSigma:null};this.opacity=null;this.xShrink=null;this.yShrink=null;this.shadowStyle=null;this.images=new Array;this.setBlur=DropShadowInterface_SetBlur;this.timer=null;this.visible=false;this.delay=null;this.linked=new Array;this.cancelTimer=DelayedPopupInterface_CancelTimer;this.hide=DelayedPopupInterface_Hide;this.toggle=PopupInterface_Toggle;this.anchorId=null;this.getAnchorX=AnchoredInterface_GetAnchorX;this.getAnchorY=AnchoredInterface_GetAnchorY;this.getAnchorZ=AnchoredInterface_GetAnchorZ;this.getAnchorWidth=AnchoredInterface_GetAnchorWidth;this.getAnchorHeight=AnchoredInterface_GetAnchorHeight;this.getAnchorPosition=AnchoredInterface_GetAnchorPosition;this.getElemWidth=AnchoredInterface_GetElemWidth;this.getElemHeight=AnchoredInterface_GetElemHeight;this.setAnchor=AnchoredInterface_SetAnchor;this.disableScroll=true;this.erase=ReportReviewPopup_Erase;this.draw=ReportReviewPopup_Draw;this.init=ReportReviewPopup_Init;this.show=ReportReviewPopup_Show;this.alignElement=ReportReviewPopup_AlignElement;this.def=null;this.term=null;this.setElement=ReportReviewPopup_SetElement;this.setDefinition=ReportReviewPopup_SetDefinition;this.setTerm=ReportReviewPopup_SetTerm;this.setTermColor=ReportReviewPopup_SetTermColor;this.implement(DropShadowInterface);this.implement(CalloutInterface);this.implement(DelayedPopupInterface);this.implement(AnchoredInterface);this.id='ReportReviewPopup';this.style='Default';this.delay=0;this.init();}
ReportReviewPopup.prototype=new BaseObject;ReportReviewPopup.prototype.constructor=ReportReviewPopup;ReportReviewPopup.superclass=BaseObject.prototype;ReportReviewPopup.styles={Default:{term:{font:{family:'Verdana, Arial, Helvetica, sans-serif',size:'11px',weight:'bold'},color:'#589c1c'},font:{family:'Verdana, Arial, Helvetica, sans-serif',size:'11px',weight:'normal'},backgroundColor:'#ffffff',borderColor:'#E9E9E9',weight:'bold',color:'#000000'}}
function ReportReviewPopup_SetElement(elem){this.elemId=elem.id;}
function ReportReviewPopup_Init(){var elem=document.createElement('div');document.getElementsByTagName('body')[0].appendChild(elem);this.elemId='report_review_content';elem.id=this.elemId;elem.style.backgroundColor=ReportReviewPopup.styles[this.style].backgroundColor;elem.style.zIndex=10000;var term=document.createElement('span');this.termId=this.elemId+'_term';term.id=this.termId;if(typeof(writeDebug)=='function')writeDebug('style name: '+this.style+"\ncolor: "+ReportReviewPopup.styles[this.style].term.color);term.style.color=ReportReviewPopup.styles[this.style].term.color;term.style.paddingBottom='5px';term.style.fontFamily=ReportReviewPopup.styles[this.style].term.font.family;term.style.fontSize=ReportReviewPopup.styles[this.style].term.font.size;term.style.fontWeight=ReportReviewPopup.styles[this.style].term.font.weight;elem.appendChild(term);var def=document.createElement('div');this.defId=this.elemId+'_def';def.id=this.defId;def.style.color=ReportReviewPopup.styles[this.style].color;def.style.fontFamily=ReportReviewPopup.styles[this.style].font.family;def.style.fontSize=ReportReviewPopup.styles[this.style].font.size;def.style.fontWeight=ReportReviewPopup.styles[this.style].font.weight;elem.appendChild(def);this.calloutPadding=10;this.cornerStyle='Default';this.shadowStyle='Default';DropShadowInterface_Init.call(this);}
function ReportReviewPopup_Erase(){CalloutInterface_Erase.call(this);DropShadowInterface_Erase.call(this);this.linked=new Array;}
function ReportReviewPopup_Draw(){this.linked=new Array;var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);var anchor=document.getElementById(this.anchorId);if(!anchor)throw new Error('Unable to find anchor element: '+this.anchorId);bHeight=2;elem.style.border='1px solid '+ReportReviewPopup.styles[this.style].borderColor;elem.style.backgroundColor=ReportReviewPopup.styles[this.style].backgroundColor;elem.style.color=ReportReviewPopup.styles[this.style].color;var pos=this.getAnchorPosition();var aLeft=DomUtils.getElementLeft(anchor);var aTop=DomUtils.getElementTop(anchor);var aHeight=DomUtils.getElementHeight(anchor);var aWidth=DomUtils.getElementWidth(anchor);var eHeight=DomUtils.getElementHeight(elem);var eWidth=DomUtils.getElementWidth(elem);switch(pos){case AnchoredInterface.ALIGN.RIGHT_TOP:elem.style.left=parseInt(aLeft)+'px';elem.style.top=parseInt(aTop-eHeight-8)+'px';break;case AnchoredInterface.ALIGN.RIGHT_BOTTOM:elem.style.left=parseInt(aLeft)+'px';elem.style.top=parseInt(aTop+aHeight+8)+'px';break;case AnchoredInterface.ALIGN.LEFT_TOP:if((aLeft+aWidth-eWidth)<0){elem.style.left=0;}
else{elem.style.left=parseInt(aLeft+aWidth-eWidth)+'px';}
elem.style.top=parseInt(aTop-eHeight)+'px';break;case AnchoredInterface.ALIGN.LEFT_BOTTOM:default:if((aLeft+aWidth-eWidth)<0){elem.style.left=0;}
else{elem.style.left=parseInt(aLeft+aWidth-eWidth)+'px';}
elem.style.top=parseInt(aTop+aHeight)+'px';break;}
DropShadowInterface_Draw.call(this);window.addEvent(elem,'mouseover',this.cancelTimer,this,true);window.addEvent(elem,'mouseout',this.hide,this,true);this.linked.push(this.dropShadowId);}
function ReportReviewPopup_Show(){this.cancelTimer();var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);var anchor=document.getElementById(this.anchorId);if(!anchor)throw new Error('Unable to find anchor element: '+this.anchorId);var wasVisible=this.visible;if(this.visible)PopupInterface_Hide.call(this);if(!this.visible){this.erase();elem.style.zIndex=parseInt(DomUtils.getZIndex(elem)+3);this.draw();var dropShadow=document.getElementById(this.dropShadowId);if(!dropShadow)throw new Error('Unable to find drop shadow element: '+this.dropShadowId);dropShadow.style.zIndex=parseInt(DomUtils.getZIndex(elem))-2;if(wasVisible)PopupInterface_Show.call(this);else DelayedPopupInterface_Show.call(this);}
return true;}
function ReportReviewPopup_AlignElement(pos){CalloutInterface_AlignElement.call(this,pos);DropShadowInterface_AlignElement.call(this,pos);}
function ReportReviewPopup_SetDefinition(definitionString){var def=document.getElementById(this.defId);if(!def)throw new Error('Unable to find definition element: '+this.defId);def.innerHTML=definitionString;}
function ReportReviewPopup_SetTerm(termString){var term=document.getElementById(this.termId);if(!term)throw new Error('Unable to find term element: '+this.termId);while(term.hasChildNodes())term.removeChild(term.firstChild);var txtTerm=document.createTextNode(termString);term.appendChild(txtTerm);}
function ReportReviewPopup_SetTermColor(color){var term=document.getElementById(this.termId);if(!term)throw new Error('Unable to find term element: '+this.termId);term.style.color=color;}
ReportReviewPopup.instance=null;ReportReviewPopup.getInstance=function(){if(!ReportReviewPopup.instance)ReportReviewPopup.instance=new ReportReviewPopup();return ReportReviewPopup.instance;}
ReportReviewPopup.show=function(anchorElement,termString,definitionString){ReportReviewPopup.getInstance().setAnchor(anchorElement);ReportReviewPopup.getInstance().setDefinition(definitionString);ReportReviewPopup.getInstance().setTerm(termString);ReportReviewPopup_Show.call(ReportReviewPopup.getInstance());}
ReportReviewPopup.hide=function(){DelayedPopupInterface_Hide.call(ReportReviewPopup.getInstance());}
ReportReviewPopup.toggle=function(anchorElement,termString,definitionString){if(ReportReviewPopup.getInstance().visible)ReportReviewPopup.hide();else ReportReviewPopup.show(anchorElement,termString,definitionString);}
function ImagePopup(anchor){this.elemId=null;this.calloutId=null;this.calloutPadding=0;this.dropShadowId=null;this.color=null;this.xOffset=null;this.yOffset=null;this.blur={iRadius:null,iSigma:null};this.opacity=null;this.xShrink=null;this.yShrink=null;this.shadowStyle=null;this.images=new Array;this.setBlur=DropShadowInterface_SetBlur;this.visible=false;this.linked=new Array;this.hide=PopupInterface_Hide;this.show=PopupInterface_Show;this.toggle=PopupInterface_Toggle;this.anchorId=null;this.getAnchorX=AnchoredInterface_GetAnchorX;this.getAnchorY=AnchoredInterface_GetAnchorY;this.getAnchorZ=AnchoredInterface_GetAnchorZ;this.getAnchorWidth=AnchoredInterface_GetAnchorWidth;this.getAnchorHeight=AnchoredInterface_GetAnchorHeight;this.getAnchorPosition=AnchoredInterface_GetAnchorPosition;this.getElemWidth=AnchoredInterface_GetElemWidth;this.getElemHeight=AnchoredInterface_GetElemHeight;this.setAnchor=AnchoredInterface_SetAnchor;this.disableScroll=true;this.cornerStyle=null;this.cornersDrawn=false;this.erase=ImagePopup_Erase;this.draw=ImagePopup_Draw;this.init=ImagePopup_Init;this.show=ImagePopup_Show;this.alignElement=ImagePopup_AlignElement;this.contentId=null;this.onMouseOver=null;this.onMouseOut=null;this.setElement=ImagePopup_SetElement;this.setContent=ImagePopup_SetContent;this.setMouseOver=ImagePopup_SetMouseOver;this.setMouseOut=ImagePopup_SetMouseOut;this.implement(DropShadowInterface);this.implement(CalloutInterface);this.implement(PopupInterface);this.implement(AnchoredInterface);this.implement(RoundedCornersInterface);this.id='ImagePopup';this.elemId=this.id;this.contentId=this.elemId+'_content';this.dropShadowId=this.elemId+'_dropShadow';this.style='Default';this.delay=500;this.init();}
ImagePopup.prototype=new BaseObject;ImagePopup.prototype.constructor=ImagePopup;ImagePopup.superclass=BaseObject.prototype;ImagePopup.styles={Default:{term:{font:{family:'Arial, Helvetica, sans-serif',size:'13px',weight:'bold'},color:'#589c1c'},font:{family:'Arial, Helvetica, sans-serif',size:'13px',weight:'normal'},backgroundColor:'#ffffff',color:'#656565'}}
function ImagePopup_SetElement(elem){if(typeof(writeDebug)=='function')writeDebug('ImagePopup_SetContent() called.');this.elemId=elem.id;if(typeof(writeDebug)=='function')writeDebug('ImagePopup_SetContent() finished.');}
function ImagePopup_Init(){var elem=document.getElementById(this.elemId);if(!elem){elem=document.createElement('div');document.getElementsByTagName('body')[0].appendChild(elem);elem.id=this.elemId;}
var content=document.getElementById(this.contentId);if(!content){content=document.createElement('div');elem.appendChild(content);content.id=this.contentId;}
elem.style.backgroundColor=ImagePopup.styles[this.style].backgroundColor;content.style.color=ImagePopup.styles[this.style].color;content.style.fontFamily=ImagePopup.styles[this.style].font.family;content.style.fontSize=ImagePopup.styles[this.style].font.size;content.style.fontWeight=ImagePopup.styles[this.style].font.weight;this.calloutPadding=20;this.cornerStyle='Default';RoundedCornersInterface_Init.call(this);this.shadowStyle='Default';DropShadowInterface_Init.call(this);}
function ImagePopup_Erase(){CalloutInterface_Erase.call(this);DropShadowInterface_Erase.call(this);RoundedCornersInterface_Erase.call(this);this.linked=new Array;}
function ImagePopup_Draw(){var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);this.linked=new Array;bHeight=2;elem.style.border='1px solid '+ImagePopup.styles[this.style].backgroundColor;elem.style.backgroundColor=ImagePopup.styles[this.style].backgroundColor;elem.style.color=ImagePopup.styles[this.style].color;window.addEvent(elem,'click',this.hide,this,true);CalloutInterface_Draw.call(this);RoundedCornersInterface_Draw.call(this);DropShadowInterface_Draw.call(this);elem.style.border='none';elem.style.backgroundColor='transparent';this.linked.push(this.dropShadowId);this.linked.push(this.calloutId);}
function ImagePopup_Show(){var wasVisible=this.visible;if(wasVisible){PopupInterface_Hide.call(this);this.erase();}
this.draw();var anchor=document.getElementById(this.anchorId);if(!anchor)throw new Error('Unable to find anchor element: '+this.anchorId);var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);var dropShadow=document.getElementById(this.dropShadowId);if(!dropShadow)throw new Error('Unable to find drop shadow element: '+this.dropShadowId);var callout=document.getElementById(this.calloutId);if(!callout)throw new Error('Unable to find callout element: '+this.calloutId);var zIndex=parseInt(DomUtils.getZIndex(anchor));if(zIndex==0){zIndex=1000;anchor.style.zIndex=zIndex;}
dropShadow.style.zIndex=zIndex+1;callout.style.zIndex=zIndex+2;elem.style.zIndex=zIndex+3;this.alignElement();PopupInterface_Show.call(this);return true;}
function ImagePopup_AlignElement(){AnchoredInterface_AlignElement.call(this);CalloutInterface_AlignElement.call(this);DropShadowInterface_AlignElement.call(this);}
function ImagePopup_SetContent(contentString){var content=document.getElementById(this.contentId);if(!content)throw new Error('Unable to find content element: '+this.contentId);content.innerHTML=contentString;}
function ImagePopup_SetMouseOver(funcRef){this.onMouseOver=funcRef;}
function ImagePopup_SetMouseOut(funcRef){this.onMouseOut=funcRef;}
ImagePopup.instance=null;ImagePopup.getInstance=function(){if(!ImagePopup.instance)ImagePopup.instance=new ImagePopup();return ImagePopup.instance;}
ImagePopup.show=function(anchorElement,contentString){ImagePopup.getInstance().setAnchor(anchorElement);ImagePopup.getInstance().setContent(contentString);ImagePopup.getInstance().show();}
ImagePopup.hide=function(){PopupInterface_Hide.call(ImagePopup.getInstance());}
ImagePopup.toggle=function(anchorElement,contentString){if(ImagePopup.getInstance().visible)ImagePopup.hide();else ImagePopup.show(anchorElement,contentString);}
var hideTimer,showTimer;var last_opened='';function showBubbleList(elem_id,width){var anchor=document.getElementById('infoBubble_popup_'+elem_id);last_opened=anchor.id;var prodImage=document.getElementById('imagePopup_image_'+elem_id).innerHTML;var prodTitle=document.getElementById('imagePopup_title_'+elem_id).innerHTML;var prodText=document.getElementById('imagePopup_text_'+elem_id).innerHTML;var prodPrice=document.getElementById('imagePopup_price_'+elem_id).innerHTML;var prodShopButton=document.getElementById('imagePopup_shop_'+elem_id).innerHTML;var prodRating=document.getElementById('imagePopup_rating_'+elem_id).innerHTML;var content='<table cellspacing=0>'+
'<tr>'+
'<td rowspan=2 width="30%">'+prodImage+'</td>'+
'<td width="68%" colspan=2 cellspacing=5 valign="top" class="productTitle"><div style="color: #A75645; font-size: 11px; font-weight: bold; margin: 0; margin-left: 5px;">'+prodTitle+'</div></td>'+
'<td width="2%" align=right valign=top><img src="http://i.pgcdn.com/images/ulists_bubbleclose.gif" border=0 style="cursor:pointer;"  onclick="hideBubble('+elem_id+')"></td>'+
'</tr>'+
'<tr>'+
'<td colspan=2 cellspacing=5 valign="top"><div style="color: #666; font-size: 10px; text-align: left; margin-top: 0px; margin-left: 5px;">'+prodText+'</div></td>'+
'</tr>'+
'<tr>'+
'<td align="center" class="productPrice">'+prodPrice+'</td>'+
'<td>'+prodRating+'</td>'+
'<td>'+prodShopButton+'</td>'+
'</tr>'+
'</table>';var imagePopup=ImagePopup.getInstance();var popupEl=document.getElementById(imagePopup.elemId);window.addEvent(popupEl,'mouseover',function(){clearHideBubbleTimer(elem_id,450,'list')},document,true);window.addEvent(popupEl,'mouseout',function(){timerHideBubble(elem_id)},document,true);popupEl.style.width=width+"px";ImagePopup.show(anchor,content);var dropShadowEl=document.getElementById(imagePopup.dropShadowId);var calloutEl=document.getElementById(imagePopup.calloutId);window.addEvent(dropShadowEl,'mouseover',function(){clearHideBubbleTimer(elem_id,450,'list')},document,true);window.addEvent(dropShadowEl,'mouseout',function(){timerHideBubble(elem_id)},document,true);window.addEvent(calloutEl,'mouseover',function(){clearHideBubbleTimer(elem_id,450,'list')},document,true);window.addEvent(calloutEl,'mouseout',function(){timerHideBubble(elem_id)},document,true);}
function showImageBubbleList(elem_id,width){anchor=document.getElementById('infoBubble_popup_'+elem_id);last_opened=anchor.id;var prodImage=document.getElementById('imagePopup_image_'+elem_id).innerHTML;var content='<table cellspacing=0  onMouseOver="javascript:clearHideBubbleTimer('+elem_id+', 450, \'list\');" onMouseOut="javascript:timerHideBubble('+elem_id+')">'+
'<tr>'+
'<td rowspan=2 width="98%">'+prodImage+'</td>'+
'<td width="2%" align=right valign=top><img src="http://i.pgcdn.com/images/ulists_bubbleclose.gif" border=0 style="cursor:pointer;"  onclick="hideBubble('+elem_id+')"></td>'+
'</tr>'+
'</table>';document.getElementById(ImagePopup.getInstance().elemId).style.width=width+"px";ImagePopup.show(anchor,content);}
function showBubbleGrid(id,width){elem=document.getElementById('infoBubble_cell_'+id);varX=DomUtils.getElementLeft(elem);varY=DomUtils.getElementTop(elem);elementWidth=DomUtils.getElementWidth(elem);elementHeight=DomUtils.getElementHeight(elem);windowWidth=DomUtils.getWindowWidth();windowHeight=DomUtils.getWindowHeight();if(windowWidth<800){var small_res=true;}
document.getElementById('infoBubble_'+id).style.display='block';document.getElementById('infoBubble_'+id).style.position='absolute';document.getElementById('infoBubbleArrow_'+id).style.position='absolute';if((varX+width+elementWidth)<windowWidth){arrowX='left';}
else if((varX+width+elementWidth)>windowWidth){arrowX='right';}else{arrowX='center';}
if(small_res){if((varX+width)<windowWidth){arrowX='left';}
else if((varX+width)>windowWidth){arrowX='right';}}
if(varY<(windowHeight/3)){arrowY='top';}else if(varY>((windowHeight/3)*2)){arrowY='bottom';}else{arrowY='mid';}
var content=document.getElementById('infoBubbleContent_'+id);content.style.width=width+'px';content.style.padding='4px 7px 0 5px';if(DomUtils.browser.isIE()==false)content.style.display='table';var footer=document.getElementById('infoBubbleFooter_'+id);footer.style.padding='0 7px 0 5px';var contentImgSrc='http://i.pgcdn.com/images/infoBubble_'+width+'px.png';var footerImgSrc='http://i.pgcdn.com/images/infoBubble_'+width+'px_footer.png';content.style.backgroundImage='url('+contentImgSrc+')';footer.style.backgroundImage='url('+footerImgSrc+')';fixBubblePNG(content,contentImgSrc);fixBubblePNG(footer,footerImgSrc);footer.style.height='14px';footer.style.width=width+'px';document.getElementById('infoBubble_'+id).style.position='absolute';if(arrowX=='right'){if(DomUtils.browser.isIE()==false){document.getElementById('infoBubble_'+id).style.left=(varX-width)+'px';}
else if(DomUtils.browser.isIE()==true){if(small_res){document.getElementById('infoBubble_'+id).style.left=varX-1.6*width+'px';}
else{document.getElementById('infoBubble_'+id).style.left=varX-(elementWidth/.45)+'px';}}
var arrow=document.getElementById('infoBubbleArrow_'+id);var arrowImgSrc='http://i.pgcdn.com/images/infoBubble_arrow_right.png';arrow.style.backgroundImage='url('+arrowImgSrc+')';fixBubblePNG(arrow,arrowImgSrc);document.getElementById('infoBubbleArrow_'+id).style.width='18px';document.getElementById('infoBubbleArrow_'+id).style.height='31px';document.getElementById('infoBubbleArrow_'+id).style.right='-8px';document.getElementById('infoBubbleArrow_'+id).style.top='31px';}
else if(arrowX=='left'){if(DomUtils.browser.isIE()==false){document.getElementById('infoBubble_'+id).style.left=varX+elementWidth+'px';}
else if(DomUtils.browser.isIE()==true){if(small_res){document.getElementById('infoBubble_'+id).style.left=width-(2*elementWidth)+'px';}
else{document.getElementById('infoBubble_'+id).style.left=varX+(elementWidth/6)+'px';}}
var arrow=document.getElementById('infoBubbleArrow_'+id);var arrowImgSrc='http://i.pgcdn.com/images/infoBubble_arrow_left.png';arrow.style.backgroundImage='url('+arrowImgSrc+')';fixBubblePNG(arrow,arrowImgSrc);arrow.style.width='14px';arrow.style.height='31px';arrow.style.left='-9px';arrow.style.top='31px';}
if(DomUtils.browser.isIE()==false){document.getElementById('infoBubble_'+id).style.top=varY+(2*(elementHeight/16))+'px';}
else if(DomUtils.browser.isIE()==true){document.getElementById('infoBubble_'+id).style.top=varY-(.9*elementHeight)+'px';}}
function hideBubble(id){document.getElementById('infoBubble_'+id).style.display='none';ImagePopup.getInstance().hide();}
function timerShowBubble(anchor,id,width,type){if(type=='image_list'){clearTimeout(hideTimer);showTimer=setTimeout(function(){showImageBubbleList(id,width);},450);}
if(type=='image_grid'){}
if(type=="list"){clearTimeout(hideTimer);showTimer=setTimeout(function(){showBubbleList(id,width);},450);}
if(type=="grid"){showTimer=setTimeout(function(){showBubbleGrid(id,width);},450);}}
function timerHideBubble(id){clearTimeout(showTimer);hideTimer=setTimeout(function(){hideBubble(id);},450);}
function clearHideBubbleTimer(id,width,type){clearTimeout(hideTimer);if(type=="grid"){pausecomp(1000);}
if(type=="grid"){showBubbleGrid(id,width);}}
function pausecomp(millis){var date=new Date();var curDate=null;do{curDate=new Date();}
while(curDate-date<millis);}
function fixBubblePNG(elem,imgSrc){var arVersion=navigator.appVersion.split("MSIE");var version=0.0;if(arVersion&&arVersion.length>1)version=parseFloat(arVersion[1]);if((version>=5.5)&&(version<7)&&(document.body.filters)){elem.style.backgroundImage='';elem.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+imgSrc+"\', sizingMethod='scale');";}}
