var PG_use_https;function addUserFavorite(user_id,preference_id_type,preference_id,element_id,element_class,element_content,callback)
{if(!user_id){user_id=util.readCookie('bake_userid');if(!user_id&&document.login&&document.login.loginSuccessUserid){user_id=document.login.loginSuccessUserid;}
if(!user_id){if(document.login){document.login.loginSuccessCallback=function(){addUserFavorite('',preference_id_type,preference_id,element_id,element_class,element_content,callback);};}
callbackfuncafterlogin="addUserFavorite('"+(user_id?user_id:"")+"','"+preference_id_type+"','"+preference_id+"','"+element_id+"','"+element_class+"','"+(element_content?element_content:"")+"','"+(callback?callback:"")+"');";if(preference_id_type=='vendor')refer_page='Add Brand to Favs';if(preference_id_type=='merchant')refer_page='Add Merchant to Favs';iframe_login('login_registration',callbackfuncafterlogin,refer_page);return;}}
if(!user_id){return false;}
var ajax=new AjaxRequest('GET','/ajax.php',true,3000);ajax.setParameter('action','addUserFavorite');ajax.setParameter('user_id',user_id);ajax.setParameter('preference_id_type',preference_id_type);ajax.setParameter('preference_id',preference_id);ajax.setParameter('element_id',element_id);ajax.setParameter('element_class',element_class);if(element_content){ajax.setParameter('element_content',element_content);}
if(PG_use_https){ajax.setParameter('secure',1);}
if(callback){ajax.setCallback(callback);}
else{ajax.setCallback(addUserFavoriteResponse);}
ajax.send();}
function addUserFavoriteResponse(xml)
{if(xml.getElementsByTagName('json')[0].firstChild.nodeValue){var data=eval('('+xml.getElementsByTagName('json')[0].firstChild.nodeValue+')');}
if(!data['success']){return false;}
if(data['element_id']){em=document.getElementById(data['element_id']);if(data['element_class']){em.className=data['element_class'];}
em.innerHTML=data['message'];}
var store_link=document.getElementById('browse_favorite_stores_link');if(store_link&&data['preference_id_type']=="merchant"){stores_link_count_em=document.getElementById('favorite_stores_count');var count=parseInt(stores_link_count_em.innerHTML);count++;stores_link_count_em.innerHTML=count;store_link.href+='/retid[]='+data['preference_id'];}
var brands_link=document.getElementById('browse_favorite_brands_link');if(brands_link&&data['preference_id_type']=="vendor"){brands_link_count_em=document.getElementById('favorite_brands_count');var count=parseInt(brands_link_count_em.innerHTML);count++;brands_link_count_em.innerHTML=count;brands_link.href+='/vendorIds[]='+data['preference_id'];}}
function deleteUserPreference(user_preference_id,preference_id_type,element_id,callback)
{user_id=util.readCookie('bake_userid');if(!user_id){LoginOverlay_login();return;}
var ajax=new AjaxRequest('GET','/ajax.php',true,3000);ajax.setParameter('action','deleteUserFavorite');ajax.setParameter('user_id',user_id);ajax.setParameter('secure',1);ajax.setParameter('user_preference_id',user_preference_id);ajax.setParameter('preference_id_type',preference_id_type);ajax.setParameter('element_id',element_id);ajax.setCallback(callback);ajax.send();}
function LoginOverlay_login(){if(!loginLoaded){var s2=document.createElement('script');s2.src=login_pop_script;document.body.appendChild(s2);}
if(!ajaxLoaded){var s1=document.createElement('script');s1.src=login_pop_ajax;document.body.appendChild(s1);}
LoginOverlay_waitForLoad();}
function LoginOverlay_waitForLoad(){if(!loginLoaded){if(window.login_js){loginLoaded=1;ShowLoginMessage('<img src="'+login_pop_wait+'" width=16 height=16>',login_pop_msg,'#666666');}
else{setTimeout('LoginOverlay_waitForLoad("");',200);return 0;}}
if(!ajaxLoaded){if(window.ajax){ajaxLoaded=1;}
else{setTimeout('LoginOverlay_waitForLoad("");',200);return 0;}}
if(ajaxLoaded&&loginLoaded){showLoginBubble();}}
Array.prototype.inArray=function(val){for(var i=0;i<this.length;i++){if(this[i]==val)return i;}
return false;}
Array.prototype.simpleXmlify=null;Error.prototype.simpleXmlify=null;var util=new Object;util.resourceManager={cache:new Array,index:new Array,get:function(url){var ptr=util.resourceManager.index.inArray(url);if(ptr===false){ptr=util.resourceManager.index.length;util.resourceManager.index[ptr]=url;util.resourceManager.cache[ptr]=new Image;util.resourceManager.cache[ptr].src=url;}
return util.resourceManager.cache[ptr].src;}};function funcname(f){var matches=f.toString().match(/function (\w*)/);if((matches==null)||(matches.length==0))return"anonymous";if(matches.length==2)return matches[1];else return matches.join(',');}
function stacktrace(){var s="";for(var a=arguments.caller;a!=null;a=a.caller){s+=funcname(a.callee)+"\n";if(a.caller==a)break;}
return s;}
util.MessageQueue=function(type){this.queued=new Array;this.containerId='message';this.type=type||util.MessageQueue.types.ALL;this.queueId=util.MessageQueue.queues.length;this.waitingForResponse=false;util.MessageQueue.queues[this.queueId]=this;return this;};util.MessageQueue.settings={timer:null,interval:5,immediate:true};util.MessageQueue.types={NONE:0,ERROR:1,DEBUG:2,USER:4,ALL:7};util.MessageQueue.queues=[];util.MessageQueue.attach=function(queue){if(!util.MessageQueue.queues.inArray(queue)){util.MessageQueue.queues.push(queue);}
return true;}
util.MessageQueue.detach=function(queue){var retain=[];var found=false;while(util.MessageQueue.queues.length){var queuePop=util.MessageQueue.queues.pop();if(queue!==queuePop)retain.push(queuePop);else found=queuePop;}
util.MessageQueue.queues=retain;return found;}
util.MessageQueue.prototype.add=function(obj,test){test=test===false?false:true;test=true;if((test&&this.isMessage(obj))||!test){this.queued.push(obj);}
if(util.MessageQueue.settings.immediate)this.renderNext();}
util.MessageQueue.prototype.isMessage=function(obj){return obj.implementsProp('title')&&obj.implementsProp('content')&&obj.implementsProp('type');}
util.MessageQueue.prototype.render=function(type){if(this.queued.length>0){var body=document.getElementsByTagName('body')[0];if(body){var types=util.MessageQueue.types;type=type<=types.ALL?type:types.ALL;var messages=new Array;if(type==types.ALL){messages=this.queued;this.queued=new Array;}else{var retain=new Array;for(var i=0;i<this.queued.length;i++){var msg=this.queued[i];if(msg.type==type){messages.push(msg);}else{retain.push(msg);}}
this.queued=retain;}
if(!this.container){this.container=document.createElement('div');this.container.className='messageContainer';body.appendChild(this.container);}
for(var i=0;i<messages.length;i++){var mesg=messages[i];mesg.displayHandler();}}}}
util.MessageQueue.prototype.renderNext=function(force){force=force||false;if(force){this.waitingForResponse=false;clearInterval(this.renderNextTimeout);this.renderNextTimeout=null;}
if(this.queued.length>0){if(!this.waitingForResponse){var body=document.getElementsByTagName('body')[0];if(!body)throw new Error('Unable to find body element');var message=null;var queueHead=new Array;do{message=this.queued.shift();if(message.type!=this.type&&this.type!=util.MessageQueue.types.ALL){queueHead.push(message);message=null;}}while(!message&&this.queued.length>0);while(queueHead.length>0){this.queued.unshift(queueHead.shift());}
if(message){this.waitingForResponse=true;message.displayHandler();}}else if(!this.renderNextTimer){this.renderNextTimer=setInterval('util.MessageQueue.queues['+this.queueId+'].renderNext()',1000);}}}
window.messageQueue=new util.MessageQueue(util.MessageQueue.types.ALL);util.createCookie=function createCookie(name,value){var argv=arguments;var argc=arguments.length;var ttl=(argc>2)?argv[2]*1000:null;var path=(argc>3)?argv[3]:null;var domain=(argc>4)?argv[4]:null;var secure=(argc>5)?argv[5]:false;if(ttl){var expires=new Date();expires.setTime(expires.getTime()+ttl);}
document.cookie=name+"="+escape(value)+
((expires==null)?"":("; expires="+expires.toGMTString()))+
((path==null)?"":("; path="+path))+
((domain==null)?"":("; domain="+domain))+
((secure==true)?"; secure":"");}
util.readCookie=function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return unescape(c.substring(nameEQ.length,c.length));}
return null;}
util.eraseCookie=function eraseCookie(name){util.createCookie(name,"",-1);}
var RecentComparisonHistory=new Object;RecentComparisonHistory.data=new Array;RecentComparisonHistory.settings={cookieName:'RecentComparisonHistory',cookieHost:'.pricegrabber.com',pageTitle:null,langId:null,tokens:{pages:',',attrs:':',masterIds:{pre:'all{',split:';',post:'}'}}};RecentComparisonHistory.createCookie=function(){var pages=new Array();for(var i=0;i<RecentComparisonHistory.data.length;i++){var attrs=new Array();var page=RecentComparisonHistory.data[i];attrs[0]=page.pageId;attrs[1]=page.title;attrs[2]=page.langId;attrs[3]=page.lastModified;var pre=RecentComparisonHistory.settings.tokens.masterIds.pre;var post=RecentComparisonHistory.settings.tokens.masterIds.post;attrs[4]=pre+page.masterIds.join(RecentComparisonHistory.settings.tokens.masterIds.split)+post;pages[i]=attrs.join(RecentComparisonHistory.settings.tokens.attrs);}
var cookieVal=pages.join(RecentComparisonHistory.settings.tokens.pages);util.createCookie(RecentComparisonHistory.settings.cookieName,cookieVal,null,'/',RecentComparisonHistory.settings.cookieHost);}
RecentComparisonHistory.parseCookie=function(){var cookieVal=util.readCookie(RecentComparisonHistory.settings.cookieName);if(cookieVal){var pages=cookieVal.split(RecentComparisonHistory.settings.tokens.pages);for(var i=0;i<pages.length;i++){var pageStr=pages[i];var attrs=pageStr.split(RecentComparisonHistory.settings.tokens.attrs);var pageIds=attrs[4].substring(RecentComparisonHistory.settings.tokens.masterIds.pre.length,attrs[4].length-RecentComparisonHistory.settings.tokens.masterIds.post.length);var page={pageId:attrs[0],title:attrs[1],langId:attrs[2],lastModified:attrs[3],masterIds:pageIds.split(RecentComparisonHistory.settings.tokens.masterIds.split)};RecentComparisonHistory.data.push(page);}}}
RecentComparisonHistory.toggleMasterId=function(pageId,masterId,catName,langId){var pageIds=new Array();for(var i=0;i<RecentComparisonHistory.data.length;i++){pageIds.push(RecentComparisonHistory.data[i].pageId);}
var idx=pageIds.inArray(pageId);if(idx===false){idx=RecentComparisonHistory.data.length;pageIds[idx]=pageId;page={pageId:pageId,title:catName,langId:langId,masterIds:new Array(masterId),timestamp:null};}else{page=RecentComparisonHistory.data[idx];if(page.masterIds.inArray(masterId)!==false){var tmpMasterIds=new Array();for(i=0;i<page.masterIds.length;i++){if(page.masterIds[i]!=masterId){tmpMasterIds.push(page.masterIds[i]);}}}else{page.masterIds.push(masterId);}}
page.lastModified=(new Date()).valueOf();RecentComparisonHistory.data[idx]=page;}
RecentComparisonHistory.newToggleMasterId=function(pageId,masterId,catName,langId,comparText0,comparText1,comparText2){var pageIds=new Array();for(var i=0;i<RecentComparisonHistory.data.length;i++){pageIds.push(RecentComparisonHistory.data[i].pageId);}
var idx=pageIds.inArray(pageId);if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return i;}}
return-1;}}
if(idx===false){idx=RecentComparisonHistory.data.length;pageIds[idx]=pageId;page={pageId:pageId,title:catName,langId:langId,masterIds:new Array(masterId),timestamp:null};}else{page=RecentComparisonHistory.data[idx];if(page.masterIds.length==1&&page.masterIds==''){page.masterIds=new Array();}
if(document.getElementById('productCompareCheckbox'+masterId).checked==false){page.masterIds.splice(page.masterIds.indexOf(masterId),1);}else if(page.masterIds.inArray(masterId)==false){page.masterIds.push(masterId);}}
page.lastModified=(new Date()).valueOf();RecentComparisonHistory.data[idx]=page;if(page.masterIds.length==0||document.getElementById('productCompareCheckbox'+masterId).checked==false){document.getElementById('productCompareLink'+masterId).innerHTML=unescape(comparText2);document.getElementById('productCompareLink'+masterId).className="";document.getElementById('productCompareDiv'+masterId).className="compareDiv";$("#productCompareLink"+masterId).unbind('click');$("#productCompareLink"+masterId).click(function(){compare_toggle_check(document.getElementById('productCompareLink'+masterId));return newToggleCompareCbx(document.getElementById('productCompareCheckbox'+masterId));});if(page.masterIds.length==1&&document.getElementById('productCompareLink'+page.masterIds[0])){document.getElementById('productCompareLink'+page.masterIds[0]).innerHTML=unescape(comparText1);document.getElementById('productCompareLink'+page.masterIds[0]).className="compareAnother";document.getElementById('productCompareDiv'+page.masterIds[0]).className="compareDiv selectAnother";}}else if(page.masterIds.length==1){document.getElementById('productCompareLink'+masterId).innerHTML=unescape(comparText1);document.getElementById('productCompareLink'+masterId).className="compareAnother";document.getElementById('productCompareDiv'+masterId).className="compareDiv selectAnother";}else{$("#productCompareLink"+masterId).unbind('click');document.getElementById('productCompareLink'+masterId).innerHTML='<span onClick="setSubmitTimeout()", 50);">'+unescape(comparText0)+'</span>';document.getElementById('productCompareLink'+masterId).className="compareNow";document.getElementById('productCompareDiv'+masterId).className="compareDiv selectCompareNow";for(var i=0;i<page.masterIds.length;i++){if(document.getElementById('productCompareLink'+page.masterIds[i])&&document.getElementById('productCompareDiv'+page.masterIds[i])){$("#productCompareLink"+page.masterIds[i]).unbind('click');document.getElementById('productCompareLink'+page.masterIds[i]).innerHTML='<span onClick="setSubmitTimeout();", 50);">'+unescape(comparText0)+'</span>';document.getElementById('productCompareLink'+page.masterIds[i]).className="compareNow";document.getElementById('productCompareDiv'+page.masterIds[i]).className="compareDiv selectCompareNow";}}}}
function setSubmitTimeout(){setTimeout("submitFormFunction();",50);}
submitFormFunction=function(){document.getElementById("productCompareForm").submit();}
RecentComparisonHistory.parseCookie();
function Browser(){}
Browser.prototype=Object;Browser.prototype.constructor=Browser;Browser.superclass=Object.constructor;Browser.regexes={overflowX:new Array(/Firefox\/1\.0/),overflowY:new Array(/Firefox\/1\.0/)};Browser.supportsOverflowX=function(){for(var i=0;i<Browser.regexes.overflowX.length;i++){var regex=Browser.regexes.overflowX[i];if(navigator.userAgent.match(regex)){return false;}}
return true;}
Browser.supportsOverflowY=function(){for(var i=0;i<Browser.regexes.overflowY.length;i++){var regex=Browser.regexes.overflowY[i];if(navigator.userAgent.match(regex)){return false;}}
return true;}
Browser.supportsDom=function(){return(document.getElementById)?true:false;}
Browser.isIE=function(){return(document.all&&navigator.appName.indexOf('Microsoft Internet Explorer')>-1)?true:false;}
Browser.isSafari=function(){return(navigator.userAgent.toLowerCase().indexOf('safari')>-1)?true:false;}
function BaseObject(id){this.getProperty=BaseObject_GetProperty;this.setProperty=BaseObject_SetProperty;this.getId=BaseObject_GetId;this.setId=BaseObject_SetId;this.properties=[];this.setId(id);return this;}
BaseObject.prototype=new Object;BaseObject.prototype.constructor=BaseObject;BaseObject.superclass=Object.prototype;function BaseObject_GetProperty(name){if(this.properties[name])return this.properties[name];else return null;}
function BaseObject_SetProperty(name,value){this.properties[name]=value;return true;}
function BaseObject_GetId(){return this.getProperty('id');}
function BaseObject_SetId(id){return this.setProperty('id',id);}
if(typeof(Interface_Implement)=='function')BaseObject.prototype.implement=Interface_Implement;
function Interface(){this.implement=Interface_Implement;return this;}
function Interface_Implement(ifaceRef){var tmpObj=new ifaceRef();var objName=(this.constructor+'').substr(('function ').length,(this.constructor+'').indexOf('(')-'function '.length);for(var prop in tmpObj){var typeCheck=false;var isFunc=false;eval('isFunc    = (typeof(tmpObj.'+prop+') == "function");');eval('typeCheck = (typeof(this.'+prop+')   == typeof(tmpObj.'+prop+'));');if(prop!='implement'&&!typeCheck){if(isFunc)throw new Error(objName+'.'+prop+"() not implemented!");else throw new Error(objName+'.'+prop+" is either a wrong type or missing.");}}}
if(typeof(BaseObject)=='function')BaseObject.prototype.implement=Interface_Implement;
function AnchoredInterface(){this.elemId=null;this.anchorId=null;this.disableScroll=false;this.getAnchorX=AnchoredInterface_GetAnchorX;this.getAnchorY=AnchoredInterface_GetAnchorY;this.getAnchorZ=AnchoredInterface_GetAnchorZ;this.getAnchorWidth=AnchoredInterface_GetAnchorWidth;this.getAnchorHeight=AnchoredInterface_GetAnchorHeight;this.getElemWidth=AnchoredInterface_GetElemWidth;this.getElemHeight=AnchoredInterface_GetElemHeight;this.getAnchorPosition=AnchoredInterface_GetAnchorPosition;this.setAnchor=AnchoredInterface_SetAnchor;this.alignElement=AnchoredInterface_AlignElement;}
AnchoredInterface.prototype=new Interface;AnchoredInterface.prototype.constructor=AnchoredInterface;AnchoredInterface.superclass=Interface.prototype;AnchoredInterface.ALIGN={RIGHT_TOP:1,RIGHT_BOTTOM:2,LEFT_BOTTOM:3,LEFT_TOP:4};function AnchoredInterface_GetAnchorX(){return DomUtils.getElementLeft(document.getElementById(this.anchorId));}
function AnchoredInterface_GetAnchorY(){return DomUtils.getElementTop(document.getElementById(this.anchorId));}
function AnchoredInterface_GetAnchorZ(){return DomUtils.getZIndex(document.getElementById(this.anchorId));}
function AnchoredInterface_GetAnchorWidth(){return DomUtils.getElementWidth(document.getElementById(this.anchorId));}
function AnchoredInterface_GetAnchorHeight(){return DomUtils.getElementHeight(document.getElementById(this.anchorId));}
function AnchoredInterface_GetElemWidth(){return DomUtils.getElementWidth(document.getElementById(this.elemId));}
function AnchoredInterface_GetElemHeight(){return DomUtils.getElementHeight(document.getElementById(this.elemId));}
function AnchoredInterface_GetAnchorPosition(){var pos=false;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 wWidth=parseInt(DomUtils.getWindowWidth(window));var wHeight=parseInt(DomUtils.getWindowHeight(window));var scrollX=parseInt(DomUtils.getWindowScrollX(window));var scrollY=parseInt(DomUtils.getWindowScrollY(window));var aWidth=parseInt(DomUtils.getElementWidth(anchor));var aHeight=parseInt(DomUtils.getElementHeight(anchor));var aX=parseInt(DomUtils.getElementLeft(anchor));var aY=parseInt(DomUtils.getElementTop(anchor));var aWidth=parseInt(DomUtils.getElementWidth(anchor));var aHeight=parseInt(DomUtils.getElementHeight(anchor));var eWidth=parseInt(DomUtils.getElementWidth(elem));var eHeight=parseInt(DomUtils.getElementHeight(elem));if(this.disableScroll){var enoughRoomOnTop=(aY-scrollY>eHeight?true:false);var enoughRoomOnBottom=(wHeight+scrollY-aHeight-aY>eHeight?true:false);var enoughRoomOnLeft=(aX-scrollX+aWidth>eWidth?true:false);var enoughRoomOnRight=(wWidth-aX+scrollX>eWidth?true:false);if(enoughRoomOnBottom&&enoughRoomOnRight){pos=AnchoredInterface.ALIGN.LEFT_TOP;}else if(enoughRoomOnTop&&enoughRoomOnRight){pos=AnchoredInterface.ALIGN.LEFT_BOTTOM;}else if(enoughRoomOnTop&&enoughRoomOnLeft){pos=AnchoredInterface.ALIGN.RIGHT_BOTTOM;}else if(enoughRoomOnBottom&&enoughRoomOnLeft){pos=AnchoredInterface.ALIGN.RIGHT_TOP;}else if(!enoughRoomOnRight){pos=AnchoredInterface.ALIGN.LEFT_TOP;}else{pos=AnchoredInterface.ALIGN.LEFT_TOP;}
return pos;}else{var not_enough_right=((aX-scrollX)+eWidth)-wWidth;var not_enough_left=eWidth-(aX-scrollX);var not_enough_absolute_left=eWidth-aX;var not_enough_bottom=((aY-scrollY)+eHeight)-wHeight;var not_enough_top=eHeight-(aY-scrollY);var not_enough_absolute_top=eHeight-aY;var horiz='';var vertic='';var ss=10;if(not_enough_right<=0||not_enough_right<not_enough_left||not_enough_absolute_left>0){horiz='right';if(not_enough_right>0){for(var i=0;i<=(not_enough_right/(ss*2))+1;i++){setTimeout('window.scroll(parseInt(DomUtils.getWindowScrollX(window))+'+ss+',parseInt(DomUtils.getWindowScrollY(window)))',100);}}
}else{horiz='left';if(not_enough_left>0&&!this.disableScroll){for(var i=0;i<=(not_enough_left/(ss*2))+1;i++){setTimeout('window.scroll(parseInt(DomUtils.getWindowScrollX(window))-'+ss+',parseInt(DomUtils.getWindowScrollY(window)))',100);}}}
if(not_enough_top<=0||(not_enough_top<not_enough_bottom&&not_enough_absolute_top<=0)){vertic='top';if(not_enough_top>0&&!this.disableScroll){for(var i=0;i<=(not_enough_top/(ss*2))+1;i++){setTimeout('window.scroll(parseInt(DomUtils.getWindowScrollX(window)),parseInt(DomUtils.getWindowScrollY(window))-'+ss+')',100);}}
}else{vertic='bottom';if(not_enough_bottom>0&&!this.disableScroll){for(var i=0;i<=(not_enough_bottom/(ss*2))+1;i++){setTimeout('window.scroll(parseInt(DomUtils.getWindowScrollX(window)),parseInt(DomUtils.getWindowScrollY(window))+'+ss+')',100);}}}
if(horiz=='right'&&vertic=='top')pos=AnchoredInterface.ALIGN.RIGHT_TOP;else if(horiz=='right'&&vertic=='bottom')pos=AnchoredInterface.ALIGN.RIGHT_BOTTOM;else if(horiz=='left'&&vertic=='top')pos=AnchoredInterface.ALIGN.LEFT_TOP;else if(horiz=='left'&&vertic=='bottom')pos=AnchoredInterface.ALIGN.LEFT_BOTTOM;return pos;}}
function AnchoredInterface_SetAnchor(anchor){this.anchorId=anchor.id;}
function AnchoredInterface_AlignElement(pos){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);pos=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-eWidth+aWidth)+'px';elem.style.top=parseInt(aTop+aHeight)+'px';break;case AnchoredInterface.ALIGN.RIGHT_BOTTOM:elem.style.left=parseInt(aLeft-eWidth+aWidth)+'px';elem.style.top=parseInt(aTop+aHeight)+'px';break;case AnchoredInterface.ALIGN.LEFT_TOP:elem.style.left=parseInt(aLeft)+'px';elem.style.top=parseInt(aTop+aHeight)+'px';break;case AnchoredInterface.ALIGN.LEFT_BOTTOM:default:elem.style.left=parseInt(aLeft)+'px';elem.style.top=parseInt(aTop-eHeight)+'px';break;}
elem=null;anchor=null;}
function CalloutInterface(){this.calloutId=null;this.elemId=null;this.anchorId=null;this.calloutPadding=0;this.erase=CalloutInterface_Erase;this.draw=CalloutInterface_Draw;this.alignElement=CalloutInterface_AlignElement;this.disableScroll=false;this.getAnchorX=AnchoredInterface_GetAnchorX;this.getAnchorY=AnchoredInterface_GetAnchorY;this.getAnchorZ=AnchoredInterface_GetAnchorZ;this.getAnchorWidth=AnchoredInterface_GetAnchorWidth;this.getAnchorHeight=AnchoredInterface_GetAnchorHeight;this.getElemWidth=AnchoredInterface_GetElemWidth;this.getElemHeight=AnchoredInterface_GetElemHeight;this.getAnchorPosition=AnchoredInterface_GetAnchorPosition;this.setAnchor=AnchoredInterface_SetAnchor;this.implement(AnchoredInterface);return this;}
CalloutInterface.prototype=new Interface;CalloutInterface.prototype.constructor=CalloutInterface;CalloutInterface.superclass=Interface.prototype;CalloutInterface.settings={images:{left:{src:util.resourceManager.get('http://i.pgcdn.com/images/balloon/left_arrow.gif'),height:23,width:11},top:{src:util.resourceManager.get('http://i.pgcdn.com/images/balloon/top_arrow.gif'),height:11,width:23},right:{src:util.resourceManager.get('http://i.pgcdn.com/images/balloon/right_arrow.gif'),height:21,width:11},bottom:{src:util.resourceManager.get('http://i.pgcdn.com/images/balloon/bottom_arrow.gif'),height:11,width:23}}};function CalloutInterface_Erase(){var callout=document.getElementById(this.calloutId);if(callout){DomUtils.removeElement(callout);}
callout=null;}
function CalloutInterface_Draw(){if(!this.calloutId)this.calloutId=this.id+'_Callout';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);if(elem&&anchor){elem.style.padding='1px';elem.style.border='1px solid #dadada';var callout=document.getElementById(this.calloutId);if(callout&&callout.parentNode)DomUtils.removeElement(callout);var pos=this.getAnchorPosition();callout=document.createElement('img');callout.id=this.calloutId;callout.style.position='absolute';callout.style.visibility='hidden';var body=document.getElementsByTagName('body')[0];body.appendChild(callout);var imgDetails;switch(pos){case AnchoredInterface.ALIGN.RIGHT_TOP:imgDetails=CalloutInterface.settings.images.top;callout.src=util.resourceManager.get(imgDetails.src);callout.height=imgDetails.height;callout.width=imgDetails.width;callout.style.left=this.calloutPadding+'px';break;case AnchoredInterface.ALIGN.RIGHT_BOTTOM:imgDetails=CalloutInterface.settings.images.top;callout.src=util.resourceManager.get(imgDetails.src);callout.height=imgDetails.height;callout.width=imgDetails.width;break;case AnchoredInterface.ALIGN.LEFT_TOP:imgDetails=CalloutInterface.settings.images.top;callout.src=util.resourceManager.get(imgDetails.src);callout.height=imgDetails.height;callout.width=imgDetails.width;break;case AnchoredInterface.ALIGN.LEFT_BOTTOM:default:imgDetails=CalloutInterface.settings.images.bottom;callout.src=util.resourceManager.get(imgDetails.src);callout.height=imgDetails.height;callout.width=imgDetails.width;break;}
}
}
function CalloutInterface_AlignElement(pos){pos=pos||this.getAnchorPosition();var elem=document.getElementById(this.elemId);if(!elem)throw new Error('Unable to find element: '+this.elemId);var callout=document.getElementById(this.calloutId);if(!callout)throw new Error('Unable to find callout element: '+this.calloutId);var anchor=document.getElementById(this.anchorId);if(!anchor)throw new Error('Unable to find anchor element: '+this.anchorId);var aTop=parseInt(DomUtils.getElementTop(anchor));var aLeft=parseInt(DomUtils.getElementLeft(anchor));var aHeight=parseInt(DomUtils.getElementHeight(anchor));var aWidth=parseInt(DomUtils.getElementWidth(anchor));var eTop=parseInt(DomUtils.getElementTop(elem));var eLeft=parseInt(DomUtils.getElementLeft(elem));var eHeight=parseInt(DomUtils.getElementHeight(elem));var eWidth=parseInt(DomUtils.getElementWidth(elem));var cHeight=parseInt(DomUtils.getElementHeight(callout));var cWidth=parseInt(DomUtils.getElementWidth(callout));switch(pos){case AnchoredInterface.ALIGN.RIGHT_TOP:elem.style.top=parseInt(eTop+cHeight)+'px';elem.style.left=parseInt(eLeft+this.calloutPadding)+'px';callout.style.left=parseInt(aLeft+parseInt(aWidth/2)-parseInt(cWidth/2))+'px';callout.style.top=parseInt(aTop+aHeight+1)+'px';callout.style.zIndex=parseInt(DomUtils.getZIndex(elem))+1;break;case AnchoredInterface.ALIGN.RIGHT_BOTTOM:elem.style.top=parseInt(eTop+cHeight-1)+'px';elem.style.left=parseInt(eLeft+this.calloutPadding)+'px';callout.style.left=parseInt(aLeft+parseInt(aWidth/2)-parseInt(cWidth/2))+'px';callout.style.top=parseInt(aTop+aHeight)+'px';callout.style.zIndex=parseInt(DomUtils.getZIndex(elem))+1;break;case AnchoredInterface.ALIGN.LEFT_TOP:elem.style.top=parseInt(eTop+cHeight-1)+'px';elem.style.left=parseInt(eLeft-this.calloutPadding)+'px';callout.style.left=parseInt(aLeft+parseInt(aWidth/2)-parseInt(cWidth/2)-1)+'px';callout.style.top=parseInt(aTop+aHeight)+'px';callout.style.zIndex=parseInt(DomUtils.getZIndex(elem))+1;break;case AnchoredInterface.ALIGN.LEFT_BOTTOM:default:elem.style.top=parseInt(eTop-cHeight-2)+'px';elem.style.left=parseInt(eLeft-this.calloutPadding)+'px';callout.style.left=parseInt(aLeft-parseInt(cWidth/2)+parseInt(aWidth/2)-1)+'px';callout.style.top=parseInt(aTop-cHeight)+'px';callout.style.zIndex=parseInt(DomUtils.getZIndex(elem))+1;break;}
}
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;}}}
