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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</title>
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<link rel="stylesheet" href='gecko_style.css'>
		<script src=Gecko_dialog.js></script><script src=../_shared.js></script>	
	</HEAD>
	<body unselectable="on">
		<table border="0" cellspacing="0" cellpadding="5" width="100%" align="center"  unselectable="on">
			<tr>
				<td style="padding:4px 0 1px 4px">						
						&nbsp;&nbsp;&nbsp;
						<IMG src="../images/ImageMap.gif" onclick="newMap();" Alt="[[AddHotSpot]]" class="dialogButton"
						onMouseOver="Check(this,1)" onMouseOut="Check(this,0)">
						<IMG src="../images/link.gif" onclick="Addlink(this);" Alt="[[insertlink]]" class="dialogButton"
						onMouseOver="Check(this,1)" onMouseOut="Check(this,0)">								
				</td>
			</tr>
			<tr>
				<td valign="top" height="250">
					<iframe id="iframe" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" src="../template.aspx"  scrolling="yes" height="100%"></iframe>
				</td>
			</tr>
			<tr>
				<td class="dialogFooter" vAlign="top" align="right" style="PADDING-RIGHT: 13px; PADDING-LEFT: 13px; PADDING-BOTTOM: 7px; PADDING-TOP: 7px">
					<table cellSpacing="0" cellPadding="1">
						<tbody>
							<tr>
								<td>
									<input type="button" value="[[Update]]" onclick="do_update()">&nbsp;&nbsp;
									<input type="button" value="[[Cancel]]" onclick="do_cancel()">&nbsp;
								</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</table>			
		

<script src="addvars.js"></script>
<script>
		var OxOded3=["dialogArguments","editor","window","document","img","contentWindow","iframe","onload","designMode","on","contentEditable","body","fontFamily","style","Tahoma","fontSize","11px","color","black","background","white","padding","10px","unselectable","innerHTML","useMap","","MAP","length","name","#","areas","href","target","alt","coords",",","\x3Cimg id=\x27myIMAGE","\x27 border=1 src=\x27images/space.gif\x27 alt=\x27[[AddLinktoImageMap]]\x27 style=\x27position:absolute;left:","px;top:","px;width:","px;height:","px;z-index:","\x27\x3E","parentNode","tagName","startOffset","endOffset","startContainer","endContainer","nodeType","childNodes","IMG","myIMAGE","id","width=350,height=212,resizable=0,toolbars=0,menubar=0,status=0","returnValue","frameloaded","keyCode","\x27  border=1 src=\x27images/space.gif\x27 alt=\x27[[AddLinktoImageMap]]\x27 style=\x27position:absolute;z-index:",";width:40;height:40;left:10;top:10\x27\x3E","\x3Carea shape=\x27rect\x27 coords=\x27","\x27","href=\x27","\x27 ","target=\x27","alt=\x27","\x3E","\x3Cmap name=\x27","\x3C/map\x3E","off","AutoMap","nodeName","\x3C","attributes","nodeValue"," ","=\x22","\x22","\x3C![CDATA[","]]\x3E","\x26",";","\x3C!--","--\x3E","HR","BR","INPUT"];var obj=top[OxOded3[0x0]];var editor=obj[OxOded3[0x1]];var editwin=obj[OxOded3[0x2]];var editdoc=obj[OxOded3[0x3]];var oImg=obj[OxOded3[0x4]]; window.focus() ;var oMap=null;var aMapName= new Array();var aLeft= new Array();var aTop= new Array();var aWidth= new Array();var aHeight= new Array();var aHref= new Array();var aTarget= new Array();var aTitle= new Array();var aCoords= new Array();var iframe=document.getElementById(OxOded3[0x6])[OxOded3[0x5]]; window[OxOded3[0x7]]=function (){ iframe[OxOded3[0x3]][OxOded3[0x8]]=OxOded3[0x9] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xa]]=true ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xd]][OxOded3[0xc]]=OxOded3[0xe] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xd]][OxOded3[0xf]]=OxOded3[0x10] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xd]][OxOded3[0x11]]=OxOded3[0x12] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xd]][OxOded3[0x13]]=OxOded3[0x14] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0xd]][OxOded3[0x15]]=OxOded3[0x16] ; oImg[OxOded3[0x17]]=OxOded3[0x9] ; iframe.focus() ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0x18]]=getOuterHTML(oImg) ;var Ox523=oImg[OxOded3[0x19]];if(Ox523!=OxOded3[0x1a]){ Ox523=Ox523.toUpperCase() ;var Ox524=editdoc[OxOded3[0xb]].getElementsByTagName(OxOded3[0x1b]);for(var i=0x0;i<Ox524[OxOded3[0x1c]];i++){ aMapName[i]=Ox524[i][OxOded3[0x1d]].toUpperCase() ;if((OxOded3[0x1e]+aMapName[i])==Ox523){ oMap=Ox524[i] ;} ;} ;} ;if(oMap){for(var i=0x0;i<oMap[OxOded3[0x1f]][OxOded3[0x1c]];i++){ aHref[i]=oMap[OxOded3[0x1f]][i][OxOded3[0x20]] ; aTarget[i]=oMap[OxOded3[0x1f]][i][OxOded3[0x21]] ; aTitle[i]=oMap[OxOded3[0x1f]][i][OxOded3[0x22]] ; aCoords[i]=oMap[OxOded3[0x1f]][i][OxOded3[0x23]] ;var Ox146=aCoords[i].split(OxOded3[0x24]); aLeft[i]=parseInt(Ox146[0x0]) ; aTop[i]=parseInt(Ox146[0x1]) ; aWidth[i]=parseInt(Ox146[0x2])-aLeft[i] ; aHeight[i]=parseInt(Ox146[0x3])-aTop[i] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0x18]]+=OxOded3[0x25]+i+OxOded3[0x26]+aLeft[i]+OxOded3[0x27]+aTop[i]+OxOded3[0x28]+aWidth[i]+OxOded3[0x29]+aHeight[i]+OxOded3[0x2a]+(i+0x1)+OxOded3[0x2b] ;} ;} ;}  ; function SearchSelectionElement(Ox130){var sel=iframe.getSelection();var r=sel.getRangeAt(0x0);var Ox2f=Range_GetParentElement(r);for(var e=Ox2f;e!=null&&e!=iframe[OxOded3[0x3]][OxOded3[0xb]];e=e[OxOded3[0x2c]]){if(e[OxOded3[0x2d]]==Ox130){return e;} ;} ;return null;}  ; function Range_GetParentElement(Ox175){var Ox32e=Ox175[OxOded3[0x2e]];var Ox32f=Ox175[OxOded3[0x2f]];var Ox330=Ox175[OxOded3[0x30]];var Ox331=Ox175[OxOded3[0x31]];if(Ox32e==Ox32f&&Ox330==Ox331){if(Ox330[OxOded3[0x32]]==0x3){return Ox330[OxOded3[0x2c]];} ;return Ox330;} ;if(Ox32f-Ox32e==0x1&&Ox330==Ox331){return Ox330[OxOded3[0x33]][Ox32e];} ;var Ox334=[];for(var Ox335=Ox330;Ox335!=null;Ox335=Ox335[OxOded3[0x2c]]){ Ox334[Ox334[OxOded3[0x1c]]]=Ox335 ;} ; Ox334.reverse() ;var Ox336=[];for(var Ox335=Ox330;Ox335!=null;Ox335=Ox335[OxOded3[0x2c]]){ Ox336[Ox336[OxOded3[0x1c]]]=Ox335 ;} ; Ox336.reverse() ;var Ox337=null;var Ox194=Math.min(Ox334[OxOded3[0x1c]],Ox336.length);for(var i=0x0;i<Ox194;i++){if(Ox334[i]==Ox336[i]){ Ox337=Ox334[i] ;} else {break ;} ;} ;if(Ox337[OxOded3[0x32]]==0x3){ Ox337=Ox337[OxOded3[0x2c]] ;} ;return Ox337;}  ; function Addlink(){var Oxb9=SearchSelectionElement(OxOded3[0x34]);if(Oxb9){if((Oxb9[OxOded3[0x36]]).indexOf(OxOded3[0x35])==-0x1){return ;} ;var Ox527=Oxb9[OxOded3[0x36]];var Ox528=parseInt(Ox527.substr(0x7));var obj={href:aHref[Ox528],target:aTarget[Ox528],title:aTitle[Ox528]}; showModalDialog('Gecko_mapLink.aspx?<%= QUERY_STRING %>',obj,OxOded3[0x37],function (Ox2dc,Ox18d){if(Ox18d[OxOded3[0x38]]){var arr=Ox18d[OxOded3[0x38]];if(arr){ aHref[Ox528]=arr[0x0] ; aTarget[Ox528]=arr[0x1] ; aTitle[Ox528]=arr[0x2] ;} ;} ;} ) ;} ;return false;}  ;if(!top[OxOded3[0x39]]){ top[OxOded3[0x39]]=true ;} ; function do_cancel(){ top[OxOded3[0x38]]=null ; top.close() ;}  ; function IsDigit(){return ((event[OxOded3[0x3a]]>=0x30)&&(event[OxOded3[0x3a]]<=0x39));}  ; function newMap(){var n=aHref[OxOded3[0x1c]]; aHref[n]=OxOded3[0x1a] ; aTarget[n]=OxOded3[0x1a] ; aTitle[n]=OxOded3[0x1a] ; iframe[OxOded3[0x3]][OxOded3[0xb]][OxOded3[0x18]]+=OxOded3[0x25]+n+OxOded3[0x3b]+(n+0x1)+OxOded3[0x3c] ; iframe.scrollBy(0x0,0x0) ; iframe.focus() ;}  ; function do_update(){var b=false;for(var i=0x0;i<aHref[OxOded3[0x1c]];i++){var obj=iframe[OxOded3[0x3]].getElementById(OxOded3[0x35]+i);if(obj){ b=true ;} ;} ;if(b){var Oxaf=OxOded3[0x1a];for(var i=0x0;i<aHref[OxOded3[0x1c]];i++){var obj=iframe[OxOded3[0x3]].getElementById(OxOded3[0x35]+i);if(obj){var Ox52a=parseInt(obj[OxOded3[0xd]].left);var Ox52b=parseInt(obj[OxOded3[0xd]].top);var Ox52c=parseInt(obj[OxOded3[0xd]].width);var Ox52d=parseInt(obj[OxOded3[0xd]].height);var Ox52e=Ox52a+Ox52c;var Ox52f=Ox52b+Ox52d; Oxaf+=OxOded3[0x3d]+Ox52a+OxOded3[0x24]+Ox52b+OxOded3[0x24]+Ox52e+OxOded3[0x24]+Ox52f+OxOded3[0x3e] ;if(aHref[i]!=OxOded3[0x1a]){ Oxaf+=OxOded3[0x3f]+aHref[i]+OxOded3[0x40] ;} ;if(aTarget[i]!=OxOded3[0x1a]&&aTarget[i]){ Oxaf+=OxOded3[0x41]+aTarget[i]+OxOded3[0x40] ;} ;if(aTitle[i]!=OxOded3[0x1a]){ Oxaf+=OxOded3[0x42]+aTitle[i]+OxOded3[0x40] ;} ; Oxaf+=OxOded3[0x43] ;} ;} ;if(oMap){ oMap[OxOded3[0x18]]=Oxaf ;} else { sUseMap=getAutoMapName() ; oImg[OxOded3[0x19]]=OxOded3[0x1e]+sUseMap ; editor.PasteHTML(OxOded3[0x44]+sUseMap+OxOded3[0x2b]+Oxaf+OxOded3[0x45]) ;} ;} else {if(oMap){} ; oImg[OxOded3[0x19]]=OxOded3[0x1a] ;} ; oImg[OxOded3[0x17]]=OxOded3[0x46] ; oImg.removeAttribute(OxOded3[0x17]) ; editor.InsertElement(oImg) ; window.close() ; top.close() ;}  ; function getAutoMapName(){var b=true;var n=0x0;var Ox25=OxOded3[0x1a];while(b){ n++ ; Ox25=OxOded3[0x47]+n ;if(isValidMapName(Ox25)){ b=false ;} ;} ;return Ox25;}  ; function isValidMapName(Ox1f){ Ox1f=Ox1f.toUpperCase() ;for(var i=0x0;i<aMapName[OxOded3[0x1c]];i++){if(aMapName[i]==Ox1f){return false;} ;} ;return true;}  ; function do_cancel(){ oImg.removeAttribute(OxOded3[0x17]) ; top.close() ;}  ; function getOuterHTML(Ox27e){var Ox1f=OxOded3[0x1a];switch(Ox27e[OxOded3[0x32]]){case 0x1: Ox1f+=OxOded3[0x49]+Ox27e[OxOded3[0x48]] ;for(var i=0x0;i<Ox27e[OxOded3[0x4a]][OxOded3[0x1c]];i++){if(Ox27e[OxOded3[0x4a]].item(i)[OxOded3[0x4b]]!=null){ Ox1f+=OxOded3[0x4c] ; Ox1f+=Ox27e[OxOded3[0x4a]].item(i)[OxOded3[0x48]] ; Ox1f+=OxOded3[0x4d] ; Ox1f+=Ox27e[OxOded3[0x4a]].item(i)[OxOded3[0x4b]] ; Ox1f+=OxOded3[0x4e] ;} ;} ;if(Ox27e[OxOded3[0x33]][OxOded3[0x1c]]==0x0&&leafElems[Ox27e[OxOded3[0x48]]]){ Ox1f+=OxOded3[0x43] ;} else { Ox1f+=OxOded3[0x43] ; Ox1f+=getInnerHTML(Ox27e) ; Ox1f+=OxOded3[0x49]+Ox27e[OxOded3[0x48]]+OxOded3[0x43] ;} ;break ;case 0x3: Ox1f+=Ox27e[OxOded3[0x4b]] ;break ;case 0x4: Ox1f+=OxOded3[0x4f]+Ox27e[OxOded3[0x4b]]+OxOded3[0x50] ;break ;case 0x5: Ox1f+=OxOded3[0x51]+Ox27e[OxOded3[0x48]]+OxOded3[0x52] ;break ;case 0x8: Ox1f+=OxOded3[0x53]+Ox27e[OxOded3[0x4b]]+OxOded3[0x54] ;break ;;;;;;} ;return Ox1f;}  ;var _leafElems=[OxOded3[0x34],OxOded3[0x55],OxOded3[0x56],OxOded3[0x57]];var leafElems={};for(var i=0x0;i<_leafElems[OxOded3[0x1c]];i++){ leafElems[_leafElems[i]]=true ;} ;
</script>
	</body>
</HTML>
