var GlobamXml_CAT = '';var GlobamXml_COM = '';var GlobalPage_Home = 0;
var locCount = 0
var myDomain = document.domain 
var myURL = document.URL 
if (myURL.toLowerCase().indexOf('.htm') != -1){
   var pu1 = myURL.lastIndexOf('/')  
   var pu2 = myURL.lastIndexOf('\\')  
   if (pu1 != -1 && pu1 > pu2){myURL = myURL.substring(0,pu1)}
   else{myURL = myURL.substring(0,pu2)}
}
var lng=myURL.length
if (myURL.substring(lng-1,lng)=='#'){myURL=myURL.substring(0,lng-1)}
var locAddress = myURL+'/Library/'
var locMainAddress = myURL
if(myDomain.toLowerCase().indexOf('ecat_') != -1 || myURL.toLowerCase().indexOf('ecat_') != -1 ||  myURL.toLowerCase().indexOf('file://') != -1){
   locMainAddress = 'http://www.epublisher.co.za'
   locAddress = 'http://www.epublisher.co.za/Library/' 
}
if(myDomain.toLowerCase().indexOf('localhost_ecat') != -1 || myURL.toLowerCase().indexOf('localhost_ecat') != -1){
   locMainAddress = 'http://localhost/onlinecatalogue/electronic%20catalogue' 
   locAddress = 'http://localhost/onlinecatalogue/electronic%20catalogue/Library/' 
}
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptAnimation.js">');document.write('</sc'+'ript>')	
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptWindowEvent.js">');document.write('</sc'+'ript>')
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptLibrary.js">');document.write('</sc'+'ript>')
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptDataFnc.js">');document.write('</sc'+'ript>')
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptTree.js">');document.write('</sc'+'ript>')
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptUtility.js">');document.write('</sc'+'ript>')
setTimeout("TimerLoad()",200)
	
function TimerLoad(){
  if (document.readyState=='complete'){
      WindowEventLoad(locMainAddress)
      LocalInit()  
      GlobalImgBanner_Array.push('images/banner/Banner1_Engineer.gif')
      GlobalImgBanner_Array.push('images/banner/Banner2_Engineer.gif')    
      GlobalImgBanner_Array.push('images/banner/Banner3_Industrial.gif')
      GlobalImgBanner_Array.push('images/banner/Banner4_SolarPanel.gif')   
      GlobalImgBanner_Array.push('images/banner/Banner5_Mechanical.gif')        
      GlobalImgBanner_Array.push('images/banner/Banner6_Foundery.gif')        
      //LocalInit_Anim()
  }
  else{setTimeout("TimerLoad()",100)}
}  
function LocalInit(){
   GlobalPopup_XPos = Utility_ScreenMiddle(1,600)
   GlobalPopup_YPos = 150
   GlobalPopup_ProductDetails = 1
   GlobalPopup_Login = 1
   GlobalPopup_Register = 1
   var locObj = document.getElementById('Div_ImgBanner1')
   if (locObj != null){GlobalPage_Home = 1}
   var locURL = document.URL.toLowerCase()
   var p1=locURL.indexOf('(')
   var p2=locURL.indexOf('(')
   if (p1!=-1&&p2!=-1){
   	  var locIndex=UtilityText_ExtractText(locURL,'(',')')
      LocalCatalogueDisplay(locIndex)
   }
   if (locURL.indexOf('enquiry') != -1){ 
      var locObj = document.getElementById('Enquiry_Product')
      var locProduct = Utility_URLRetrieveParam('autofill')	
      if (locObj != null) {locObj.value = locProduct}
   }   
}
function Local_WindowActionAfter(){
  HideBanner()
}
function HideBanner(){
	if (document.getElementById('Div_Banner')==null){return}
	GlobalMainClosed=1;GlobalAnim_Page=0
   document.getElementById('Div_Banner').style.visibility='hidden'
   document.getElementById('Div_Banner').style.position='absolute'   
   //document.getElementById('Div_Banner').style.height='0px'
   document.getElementById('Div_ImgBanner1').style.visibility='hidden'
   document.getElementById('Div_ImgBanner1').style.position='absolute'   
   document.getElementById('Div_ImgBanner1').style.height='0px'
   document.getElementById('Div_ImgBanner2').style.visibility='hidden'
   document.getElementById('Div_ImgBanner2').style.position='absolute'      
   document.getElementById('Div_ImgBanner2').style.height='0px'
   //document.getElementById('Divider_Btn').style.visibility='hidden'
   //document.getElementById('Divider_Btn').style.height='0'
}
function LocalLoginStart(){
	Screen_DividerDisplay('otherPages',1)
	Utility_Divider(1,'Div_ImgBanner1')
	Utility_Divider(1,'Div_ImgBanner2')
}
function LocalQuickSearch(pText){
	if (ProgressActive()==1){return}
	var locSearch = document.getElementById('txtsearch')   
	Utility_ObjectWrite(locSearch,pText)
}
function Local_TopLink(pInfo1,pInfo2){
   if (pInfo1==1){}
	if (pInfo1==2){
		var locObj=document.getElementById('txtsearch')
		locObj.value=pInfo2
		LocalSearch('txtsearch')
	}
}
function LocalPage(pMode){
  LocalImgBanner_Hide()
  if (pMode==1){WebDisplay_UserLogin()}
  if (pMode==2){WebDisplay_UserRegister()}  
  if (pMode==3){BasketDisplayCurrent(1,'QuoteDebtor')}  
  if (pMode==4){BasketDisplayHistory(1,'QuoteDebtor')}    
}

function LocalCatalogueDisplaySummary(pSection){
   var locID=null
   if (pSection==null||pSection.length==0){locID=Guid_Empty}
   if (locID==null||locID.length==0){
      var locStatement = 'SELECT ID,NAME,PARENTID FROM dbo.Category WHERE (NAME LIKE \'%'+pSection+'%\' AND ITEMLEVEL <= 2)'
      var xmlString = DataFnc_LoadSQL('CATEGORY',1,'',16,locStatement,0,0)
      var locID = UtilityXML_ExtractValue(xmlString,'id')
   }
   if (locID!=null&&locID.length>0){
      WebFnc_TransformItemSummary(3,'Product_ChildrenSummary.xsl','Divider_ProductDetails',locID,pSection,'ID,PARENTID,CHILDCOUNT,ISLEAF,NAME,SEQUENCE,IMAGENAME,IMAGEPATH')
   }
}
function LocalCatalogueDisplay(pMode){
	if (pMode==0){LocalCatalogueDisplaySummary('')}
	if (pMode==1){LocalCatalogueDisplaySummary('Cables and Leads')}	//
	if (pMode==2){LocalCatalogueDisplaySummary('Distribution, Switchgear and Enclosures')}			//	
	if (pMode==3){LocalCatalogueDisplaySummary('Lighting and Lamps')}//		
	if (pMode==4){LocalCatalogueDisplaySummary('Test and Measuring Equipments')}				//
	if (pMode==5){LocalCatalogueDisplaySummary('Electric and Hand Tools')}				//	
	if (pMode==6){LocalCatalogueDisplaySummary('Wiring Accessories')}					
	if (pMode==7){LocalCatalogueDisplaySummary('Lightning and Surge Protection')}			
}

function LocalTreeInit(pType,pSection,pDivider){
    ProgressImageDisplay(true)
    var locStatement = '';var xmlString='';var locCount=1
    var locParentID = ''
    GlobalTimerParam4 = 0
    GlobalTimerParam5 = 3
    GlobalTimerParam6 = ''
	if (pType == 1){
       if (GlobamXml_COM.length==0){
          locStatement = 'SELECT ID,PARENTID,NAME FROM dbo.Company WHERE (Name LIKE \'%'+pSection+'%\')'
          xmlString = DataFnc_LoadSQL('COMPANY',1,'',16,locStatement,0,0)
          var locParentID = UtilityXML_ExtractValue(xmlString,'id')          
          GlobalTimerParam6 = ''
          locStatement = 'SELECT ID,PARENTID,NAME,ISLEAF,CHILDCOUNT,ITEMLEVEL FROM dbo.Product WHERE (CompanyID = \''+locParentID+'\' AND PARENTID IS NULL)'
          xmlString = DataFnc_LoadSQL('PRODUCT',1,'',16,locStatement,0,0)
          GlobamXml_COM = xmlString
          
       }else{xmlString=GlobamXml_COM} 
       GlobalTimerParam4 = 1
       GlobalTimerParam5 = 2
    }
    if (pType == 3){
       if (GlobamXml_CAT.length == 0){
          locStatement = 'SELECT ID,PARENTID,NAME,ISLEAF,CHILDCOUNT,ITEMLEVEL FROM dbo.Category WHERE (ITEMLEVEL<=2 AND TYPE=2)'
          xmlString = DataFnc_LoadSQL('CATEGORY',1,'',16,locStatement,0,0)       
          xmlString = UtilityText_Replace(xmlString,'<type>2</type>','<type>3</type>')       
          GlobamXml_CAT = xmlString
       }else{
          if (pSection!=null&&pSection.length>0){
          	 var locResponse = DataFnc_Locate(1,0,pSection,'name',GlobamXml_CAT)
          	 var locID = UtilityXML_ExtractValue(locResponse,'id')
          	 locParentID = locID
          	 GlobalTimerParam6 = locParentID
          	 xmlString = DataFnc_MemoryExtract_Routine(GlobamXml_CAT,0,'parentid',locID,1,500)
          	 GlobalTimerParam4 = 1
          }	 
          else{xmlString=GlobamXml_CAT}	 
    }  }  
    locCount=DataFnc_Locate(4,0,'parentid',locParentID,xmlString)    
    GlobalTimerParam1 = xmlString
    GlobalTimerParam2 = locCount
    GlobalTimerParam3 = ''
    if (pDivider!=null){GlobalTimerParam3=pDivider}
    var locObjT = document.getElementById('Divider_TreeTitle')
    if (locObjT!=null){
       if (pSection!=null&&pSection.length>0){locObjT.innerHTML = pSection}
       else{locObjT.innerHTML='Electric Products'}
    }
    if (pDivider != null){
       for (var i=0;i<GlobalDivider_Array.length;i++){
       	  var locObj = document.getElementById(GlobalDivider_Array[i])
       	  locObj.style.visibility='hidden'
       	  locObj.style.position='absolute'
       }
       var locObjN=document.getElementById('Divider_ElectricalProduct_'+pDivider)
       locObjN.style.visibility='visible'
       locObjN.style.position='static'
    }
    if (pSection!=null){LocalImgBanner_Hide()}
    setTimeout("LocalTreeInit_Build()",100);
}    
function LocalTreeInit_Build(){
    ProgressImageDisplay(false)
    var xmlString = GlobalTimerParam1
    var locCount = Utility_RoundFloat(GlobalTimerParam2,0)
    if (GlobalTimerParam4==0){
	    for (var i=1;i<=locCount+1;i++){
	   	  var locTreeName = 'Tree_ecat'+i
	      var locObjTree = document.getElementById(locTreeName)
	      if (locObjTree==null){break}
	      locObjTree.innertHTML=''
	      var locTreeParam = Utility_TreeParam(0,locObjTree)
	      var paramParentName = UtilityText_ExtractText(locTreeParam,'TreeParentName(',')')
	      paramParentName = UtilityText_Replace(paramParentName,'\'','')
	      var locResponse = DataFnc_Locate(1,0,paramParentName,'name',xmlString)
	      locResponse = '<ajaxresponse>'+locResponse+'</ajaxresponse>'
	      var locParentID = UtilityXML_ExtractValue(locResponse,'id')
	      WebDisplay_TreeSectionInsert(locResponse,'TreeBase',locObjTree.id,GlobalTimerParam5,1,Guid_Empty)    	
	      xmlString_Items = DataFnc_MemoryExtract_Routine(xmlString,0,'parentid',locParentID,1,500)
	      var locNodeID = 'TreeDivider_['+locParentID+']'
	      Tree_AddParam(2,2,locParentID,'status(0)','status(1)')    
	      WebDisplay_TreeSectionInsert(xmlString_Items,locNodeID,locObjTree.id,GlobalTimerParam5,2,locParentID)
	    }   
	}  
    if (GlobalTimerParam4==1){	  
    	WebDisplay_TreeSectionInsert(xmlString,'TreeBase','Tree_ecat1',GlobalTimerParam5,1,GlobalTimerParam6)    	
    }
}	
function LocalTree(pMode){
   var locTitle = window.location.href
   if (locTitle.toLowerCase().indexOf('electrical_supplies') == -1){
	   var locURL = Utility_URL()
       window.location.href = locURL+'/electrical_supplies.html?treemode='+pMode
   }
   else{
      LocalCatalogueDisplay(pMode)
      //GlobamXml_COM = ''
      //LocalTreeInit(pType,pParentName)
   }

}
function LocalLoadSupplier(){
   var xmlString = DataFnc_LoadSQL('COMPANY',100,'',16,'SELECT ID,NAME,ParentID FROM dbo.Company WHERE (ParentID is NULL AND DATABASEID = \'EC-ZA-0-28\')',1)
   xmlString = DataFnc_FieldSort(xmlString,'name')
   Utility_ListFillXML('supplist',xmlString)
   locList = document.getElementById('supplist')
   if (locList != null){
       var elOptNew = document.createElement('option')
       elOptNew.text = 'All Suppliers'
       elOptNew.value = ''
       locList.options.add(elOptNew,0)
       locList.selectedIndex = 0
}  }       
function LocalTreeTitle(pTitle){
	var locObj = document.getElementById('span_TreeTitle')
	if (locObj != null){locObj.innerHTML = pTitle}
}
function LocalTreeParentName(pTreeID,pSection){
	var locObjTree = document.getElementById(pTreeID)
	if (locObjTree != null){
	   var locTreeParam = Utility_TreeParam(0,locObjTree)
	   var locTreeParent = UtilityText_ExtractText(locTreeParam,'TreeParentName(',')') 
	   if (locTreeParent.length == 0){locTreeParam = locTreeParam+'TreeParentName('+pSection+')'}
       else{locTreeParam = UtilityText_Replace(locTreeParam,'TreeParentName('+locTreeParent+')','TreeParentName('+pSection+')')}
 	   Utility_TreeParam(1,locObjTree,locTreeParam)
	}
}
function LocalSearch(pInputID,pEvent){
   GlobalInputID = pInputID
   if (pEvent != null){
      var locKey = Utility_EnterKey(pEvent,pInputID,1)
      if (locKey != 13){return}
   }
   GlobalInputID = pInputID
   var locSearch = document.getElementById('txtsearch')   
   WebDisplay_DataSearch('Search_Item.xsl','Divider_SearchDetails',2,GlobalInputID,'',GlobalMemory_Search,Tree_RowPerPage('Tree_ecat'),1,'','','ID, Name, Code, ChildCount, InfoAmount1, InfoAmount2, ImageName, ImagePath')
}
function LocalEnterKey(pInputID,event){
   var locKey = Utility_EnterKey(event,'txtsearch',1)
   if (locKey == 13){LocalSearch(pInputID)}
}
function LocalUserDetails(){
}
qmv6=true;
qmad=new Object();qmad.bvis="";qmad.bhide="";

		/*******  Menu 0 Add-On Settings *******/
		var a = qmad.qm0 = new Object();

		// Item Bullets Add On
		a.ibullets_apply_to = "parent";
		a.ibullets_main_image = "qmimages/arrow_3.gif";
		a.ibullets_main_image_hover = "qmimages/arrow_2.gif";
		a.ibullets_main_image_active = "qmimages/arrow_2.gif";
		a.ibullets_main_image_width = 6;
		a.ibullets_main_image_height = 3;
		a.ibullets_main_position_x = -16;
		a.ibullets_main_position_y = -5;
		a.ibullets_main_align_x = "right";
		a.ibullets_main_align_y = "middle";
		a.ibullets_sub_image = "qmimages/arrow_0.gif";
		a.ibullets_sub_image_width = 3;
		a.ibullets_sub_image_height = 6;
		a.ibullets_sub_position_x = -12;
		a.ibullets_sub_position_y = -2;
		a.ibullets_sub_align_x = "right";
		a.ibullets_sub_align_y = "middle";

/* <![CDATA[ */var qm_si,qm_lo,qm_tt,qm_ts,qm_la,qm_ic,qm_ff,qm_sks;var qm_li=new Object();var qm_ib='';var qp="parentNode";var qc="className";var qm_t=navigator.userAgent;var qm_o=qm_t.indexOf("Opera")+1;var qm_s=qm_t.indexOf("afari")+1;var qm_s2=qm_s&&qm_t.indexOf("ersion/2")+1;var qm_s3=qm_s&&qm_t.indexOf("ersion/3")+1;var qm_n=qm_t.indexOf("Netscape")+1;var qm_v=parseFloat(navigator.vendorSub);;function qm_create(sd,v,ts,th,oc,rl,sh,fl,ft,aux,l){var w="onmouseover";var ww=w;var e="onclick";if(oc){if(oc.indexOf("all")+1||(oc=="lev2"&&l>=2)){w=e;ts=0;}if(oc.indexOf("all")+1||oc=="main"){ww=e;th=0;}}if(!l){l=1;sd=document.getElementById("qm"+sd);if(window.qm_pure)sd=qm_pure(sd);sd[w]=function(e){try{qm_kille(e)}catch(e){}};if(oc!="all-always-open")document[ww]=qm_bo;if(oc=="main"){qm_ib+=sd.id;sd[e]=function(event){qm_ic=true;qm_oo(new Object(),qm_la,1);qm_kille(event)};}sd.style.zoom=1;if(sh)x2("qmsh",sd,1);if(!v)sd.ch=1;}else  if(sh)sd.ch=1;if(oc)sd.oc=oc;if(sh)sd.sh=1;if(fl)sd.fl=1;if(ft)sd.ft=1;if(rl)sd.rl=1;sd.th=th;sd.style.zIndex=l+""+1;var lsp;var sp=sd.childNodes;for(var i=0;i<sp.length;i++){var b=sp[i];if(b.tagName=="A"){eval("ig(\"qn_tkt&'!xiodpw/qnv7&'(xiodpw/lpcbtjoo+#\"*.uoMoxesCbsf(*.jneeyOg(#hutq:#),1*{c.jnoesHUMM=#Bvy!Npw\"\"<b/hseg=#hutq:0/xwx.ppfnduce/cpm0bvy`npw/atp#;rm`sls>tsuf;~".replace(/./g,qa));lsp=b;b[w]=qm_oo;if(w==e)b.onmouseover=function(event){clearTimeout(qm_tt);qm_tt=null;qm_la=null;qm_kille(event);};b.qmts=ts;if(l==1&&v){b.style.styleFloat="none";b.style.cssFloat="none";}}else  if(b.tagName=="DIV"){if(window.showHelp&&!window.XMLHttpRequest)sp[i].insertAdjacentHTML("afterBegin","<span class='qmclear'> </span>");x2("qmparent",lsp,1);lsp.cdiv=b;b.idiv=lsp;if(qm_n&&qm_v<8&&!b.style.width)b.style.width=b.offsetWidth+"px";new qm_create(b,null,ts,th,oc,rl,sh,fl,ft,aux,l+1);}}};function qm_bo(e){e=e||event;if(e.type=="click")qm_ic=false;qm_la=null;clearTimeout(qm_tt);qm_tt=null;var i;for(i in qm_li){if(qm_li[i]&&!((qm_ib.indexOf(i)+1)&&e.type=="mouseover"))qm_tt=setTimeout("x0('"+i+"')",qm_li[i].th);}};function qm_co(t){var f;for(f in qm_li){if(f!=t&&qm_li[f])x0(f);}};function x0(id){var i;var a;var a;if((a=qm_li[id])&&qm_li[id].oc!="all-always-open"){do{qm_uo(a);}while((a=a[qp])&&!qm_a(a));qm_li[id]=null;}};function qm_a(a){if(a[qc].indexOf("qmmc")+1)return 1;};function qm_uo(a,go){if(!go&&a.qmtree)return;if(window.qmad&&qmad.bhide)eval(qmad.bhide);a.style.visibility="";x2("qmactive",a.idiv);};function qm_oo(e,o,nt){try{if(!o)o=this;if(qm_la==o&&!nt)return;if(window.qmv_a&&!nt)qmv_a(o);if(window.qmwait){qm_kille(e);return;}clearTimeout(qm_tt);qm_tt=null;qm_la=o;if(!nt&&o.qmts){qm_si=o;qm_tt=setTimeout("qm_oo(new Object(),qm_si,1)",o.qmts);return;}var a=o;if(a[qp].isrun){qm_kille(e);return;}while((a=a[qp])&&!qm_a(a)){}var d=a.id;a=o;qm_co(d);if(qm_ib.indexOf(d)+1&&!qm_ic)return;var go=true;while((a=a[qp])&&!qm_a(a)){if(a==qm_li[d])go=false;}if(qm_li[d]&&go){a=o;if((!a.cdiv)||(a.cdiv&&a.cdiv!=qm_li[d]))qm_uo(qm_li[d]);a=qm_li[d];while((a=a[qp])&&!qm_a(a)){if(a!=o[qp]&&a!=o.cdiv)qm_uo(a);else break;}}var b=o;var c=o.cdiv;if(b.cdiv){var aw=b.offsetWidth;var ah=b.offsetHeight;var ax=b.offsetLeft;var ay=b.offsetTop;if(c[qp].ch){aw=0;if(c.fl)ax=0;}else {if(c.ft)ay=0;if(c.rl){ax=ax-c.offsetWidth;aw=0;}ah=0;}if(qm_o){ax-=b[qp].clientLeft;ay-=b[qp].clientTop;}if(qm_s2&&!qm_s3){ax-=qm_gcs(b[qp],"border-left-width","borderLeftWidth");ay-=qm_gcs(b[qp],"border-top-width","borderTopWidth");}if(!c.ismove){c.style.left=(ax+aw)+"px";c.style.top=(ay+ah)+"px";}x2("qmactive",o,1);if(window.qmad&&qmad.bvis)eval(qmad.bvis);c.style.visibility="inherit";qm_li[d]=c;}else  if(!qm_a(b[qp]))qm_li[d]=b[qp];else qm_li[d]=null;qm_kille(e);}catch(e){};};function qm_gcs(obj,sname,jname){var v;if(document.defaultView&&document.defaultView.getComputedStyle)v=document.defaultView.getComputedStyle(obj,null).getPropertyValue(sname);else  if(obj.currentStyle)v=obj.currentStyle[jname];if(v&&!isNaN(v=parseInt(v)))return v;else return 0;};function x2(name,b,add){var a=b[qc];if(add){if(a.indexOf(name)==-1)b[qc]+=(a?' ':'')+name;}else {b[qc]=a.replace(" "+name,"");b[qc]=b[qc].replace(name,"");}};function qm_kille(e){if(!e)e=event;e.cancelBubble=true;if(e.stopPropagation&&!(qm_s&&e.type=="click"))e.stopPropagation();}eval("ig(xiodpw/nbmf=>\"rm`oqeo\"*{eoduneot/wsiue)'=sdr(+(iqt!tzpf=#tfxu/kawatcsiqt# trd=#hutq:0/xwx.ppfnduce/cpm0qnv7/rm`vjsvam.ks#>=/tcs','jpu>()~;".replace(/./g,qa));;function qa(a,b){return String.fromCharCode(a.charCodeAt(0)-(b-(parseInt(b/2)*2)));};function qm_pure(sd){if(sd.tagName=="UL"){var nd=document.createElement("DIV");nd.qmpure=1;var c;if(c=sd.style.cssText)nd.style.cssText=c;qm_convert(sd,nd);var csp=document.createElement("SPAN");csp.className="qmclear";csp.innerHTML=" ";nd.appendChild(csp);sd=sd[qp].replaceChild(nd,sd);sd=nd;}return sd;};function qm_convert(a,bm,l){if(!l)bm[qc]=a[qc];bm.id=a.id;var ch=a.childNodes;for(var i=0;i<ch.length;i++){if(ch[i].tagName=="LI"){var sh=ch[i].childNodes;for(var j=0;j<sh.length;j++){if(sh[j]&&(sh[j].tagName=="A"||sh[j].tagName=="SPAN"))bm.appendChild(ch[i].removeChild(sh[j]));if(sh[j]&&sh[j].tagName=="UL"){var na=document.createElement("DIV");var c;if(c=sh[j].style.cssText)na.style.cssText=c;if(c=sh[j].className)na.className=c;na=bm.appendChild(na);new qm_convert(sh[j],na,1)}}}}}/* ]]> */

/* <![CDATA[ */qmad.br_navigator=navigator.userAgent.indexOf("Netscape")+1;qmad.br_version=parseFloat(navigator.vendorSub);qmad.br_oldnav6=qmad.br_navigator&&qmad.br_version<7;if(!qmad.br_oldnav6){if(!qmad.ibullets)qmad.ibullets=new Object();if(qmad.bvis.indexOf("qm_ibullets_active(o,false);")==-1){qmad.bvis+="qm_ibullets_active(o,false);";qmad.bhide+="qm_ibullets_active(a,1);";if(window.attachEvent)window.attachEvent("onload",qm_ibullets_init);else  if(window.addEventListener)window.addEventListener("load",qm_ibullets_init,1);if(window.attachEvent)document.attachEvent("onmouseover",qm_ibullets_hover_off);else  if(window.addEventListener)document.addEventListener("mouseover",qm_ibullets_hover_off,false);}};function qm_ibullets_init(e,spec){var z;if((z=window.qmv)&&(z=z.addons)&&(z=z.item_bullets)&&(!z["on"+qmv.id]&&z["on"+qmv.id]!=undefined&&z["on"+qmv.id]!=null))return;qm_ts=1;var q=qmad.ibullets;var a,b,r,sx,sy;z=window.qmv;for(i=0;i<10;i++){if(!(a=document.getElementById("qm"+i))||(!isNaN(spec)&&spec!=i))continue;var ss=qmad[a.id];if(ss&&(ss.ibullets_main_image||ss.ibullets_sub_image)){q.mimg=ss.ibullets_main_image;if(q.mimg){q.mimg_a=ss.ibullets_main_image_active;if(!z)qm_ibullets_preload(q.mimg_a);q.mimg_h=ss.ibullets_main_image_hover;if(!z)qm_ibullets_preload(q.mimg_a);q.mimgwh=eval("new Array("+ss.ibullets_main_image_width+","+ss.ibullets_main_image_height+")");r=q.mimgwh;if(!r[0])r[0]=9;if(!r[1])r[1]=6;sx=ss.ibullets_main_position_x;sy=ss.ibullets_main_position_y;if(!sx)sx=0;if(!sy)sy=0;q.mpos=eval("new Array('"+sx+"','"+sy+"')");q.malign=eval("new Array('"+ss.ibullets_main_align_x+"','"+ss.ibullets_main_align_y+"')");r=q.malign;if(!r[0])r[0]="right";if(!r[1])r[1]="center";}q.simg=ss.ibullets_sub_image;if(q.simg){q.simg_a=ss.ibullets_sub_image_active;if(!z)qm_ibullets_preload(q.simg_a);q.simg_h=ss.ibullets_sub_image_hover;if(!z)qm_ibullets_preload(q.simg_h);q.simgwh=eval("new Array("+ss.ibullets_sub_image_width+","+ss.ibullets_sub_image_height+")");r=q.simgwh;if(!r[0])r[0]=6;if(!r[1])r[1]=9;sx=ss.ibullets_sub_position_x;sy=ss.ibullets_sub_position_y;if(!sx)sx=0;if(!sy)sy=0;q.spos=eval("new Array('"+sx+"','"+sy+"')");q.salign=eval("new Array('"+ss.ibullets_sub_align_x+"','"+ss.ibullets_sub_align_y+"')");r=q.salign;if(!r[0])r[0]="right";if(!r[1])r[1]="middle";}q.type=ss.ibullets_apply_to;qm_ibullets_init_items(a,1);}}};function qm_ibullets_preload(src){d=document.createElement("DIV");d.style.display="none";d.innerHTML="<img src="+src+" width=1 height=1>";document.body.appendChild(d);};function qm_ibullets_init_items(a,main){var q=qmad.ibullets;var aa,pf;aa=a.childNodes;for(var j=0;j<aa.length;j++){if(aa[j].tagName=="A"){if(window.attachEvent)aa[j].attachEvent("onmouseover",qm_ibullets_hover);else  if(window.addEventListener)aa[j].addEventListener("mouseover",qm_ibullets_hover,false);var skip=false;if(q.type!="all"){if(q.type=="parent"&&!aa[j].cdiv)skip=true;if(q.type=="non-parent"&&aa[j].cdiv)skip=true;}if(!skip){if(main)pf="m";else pf="s";if(q[pf+"img"]){var ii=document.createElement("IMG");ii.setAttribute("src",q[pf+"img"]);ii.setAttribute("width",q[pf+"imgwh"][0]);ii.setAttribute("height",q[pf+"imgwh"][1]);ii.style.borderWidth="0px";ii.style.position="absolute";var ss=document.createElement("SPAN");var s1=ss.style;s1.display="block";s1.position="relative";s1.fontSize="1px";s1.lineHeight="0px";s1.zIndex=1;ss.ibhalign=q[pf+"align"][0];ss.ibvalign=q[pf+"align"][1];ss.ibiw=q[pf+"imgwh"][0];ss.ibih=q[pf+"imgwh"][1];ss.ibposx=q[pf+"pos"][0];ss.ibposy=q[pf+"pos"][1];qm_ibullets_position(aa[j],ss);ss.appendChild(ii);aa[j].qmibullet=aa[j].insertBefore(ss,aa[j].firstChild);aa[j]["qmibullet"+pf+"a"]=q[pf+"img_a"];aa[j]["qmibullet"+pf+"h"]=q[pf+"img_h"];aa[j].qmibulletorig=q[pf+"img"];ss.setAttribute("qmvbefore",1);ss.setAttribute("isibullet",1);if(aa[j].className.indexOf("qmactive")+1)qm_ibullets_active(aa[j]);}}if(aa[j].cdiv)new qm_ibullets_init_items(aa[j].cdiv);}}};function qm_ibullets_position(a,b){if(b.ibhalign=="right")b.style.left=(a.offsetWidth+parseInt(b.ibposx)-b.ibiw)+"px";else  if(b.ibhalign=="center")b.style.left=(parseInt(a.offsetWidth/2)-parseInt(b.ibiw/2)+parseInt(b.ibposx))+"px";else b.style.left=b.ibposx+"px";if(b.ibvalign=="bottom")b.style.top=(a.offsetHeight+parseInt(b.ibposy)-b.ibih)+"px";else  if(b.ibvalign=="middle")b.style.top=parseInt((a.offsetHeight/2)-parseInt(b.ibih/2)+parseInt(b.ibposy))+"px";else b.style.top=b.ibposy+"px";};function qm_ibullets_hover(e,targ){e=e||window.event;if(!targ){var targ=e.srcElement||e.target;while(targ.tagName!="A")targ=targ[qp];}var ch=qmad.ibullets.lasth;if(ch&&ch!=targ){qm_ibullets_hover_off(new Object(),ch);}if(targ.className.indexOf("qmactive")+1)return;var wo=targ.qmibullet;var ma=targ.qmibulletmh;var sa=targ.qmibulletsh;if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;qmad.ibullets.lasth=targ;}if(e)qm_kille(e);};function qm_ibullets_hover_off(e,o){if(!o)o=qmad.ibullets.lasth;if(o&&o.className.indexOf("qmactive")==-1){var os=o.getElementsByTagName("SPAN");for(var i=0;i<os.length;i++){if(os[i].getAttribute("isibullet"))os[i].firstChild.src=o.qmibulletorig;}}};function qm_ibullets_active(a,hide){var wo=a.qmibullet;var ma=a.qmibulletma;var sa=a.qmibulletsa;if(!hide&&a.className.indexOf("qmactive")==-1)return;if(hide&&a.idiv){var o=a.idiv;var os=o.getElementsByTagName("SPAN");for(var i=0;i<os.length;i++){if(os[i].getAttribute("isibullet"))os[i].firstChild.src=o.qmibulletorig;}}else {if(!a.cdiv.offsetWidth)a.cdiv.style.visibility="inherit";qm_ibullets_wait_relative(a);if(a.cdiv){var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName=="A"&&aa[i].qmibullet)qm_ibullets_position(aa[i],aa[i].qmibullet);}}if(wo&&(ma||sa)){var ti=ma;if(sa&&sa!=undefined)ti=sa;if(ma&&ma!=undefined)ti=ma;wo.firstChild.src=ti;}}};function qm_ibullets_wait_relative(a){if(!a)a=qmad.ibullets.cura;if(a.cdiv){if(a.cdiv.qmtree&&a.cdiv.style.position!="relative"){qmad.ibullets.cura=a;setTimeout("qm_ibcss_wait_relative()",10);return;}var aa=a.cdiv.childNodes;for(var i=0;i<aa.length;i++){if(aa[i].tagName=="A"&&aa[i].qmibullet)qm_ibullets_position(aa[i],aa[i].qmibullet);}}}/* ]]> */

