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('localhost_ecat') != -1 || myURL.toLowerCase().indexOf('localhost_ecat') != -1){
    locMainAddress = 'http://localhost/onlinecatalogue/electronic%20catalogue' 
 locAddress = 'http://localhost/onlinecatalogue/electronic%20catalogue/Library/' 
}
else if(myDomain.toLowerCase().indexOf('websites_ecatalogue') != -1 || myURL.toLowerCase().indexOf('websites_ecatalogue') != -1 || myURL.toLowerCase().indexOf('file://') != -1){
      locMainAddress = 'http://196.30.166.51/qaCatalogue'
      locAddress = 'http://196.30.166.51/qaCatalogue/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()",1000)
	
function TimerLoad(){
  var locData = document.getElementById('MainVariable_(ID)')
  if (locData == null){locData = document.getElementById('CatalogueID)')}
  if (locData != null){
  	  LocalInit()
  }
  else{setTimeout("TimerLoad()",100)}
}  
function LocalInit(){
   GlobalPopup_XPos = Utility_ScreenMiddle(1,600)
   GlobalPopup_YPos = 100
   GlobalPopup_ProductDetails = 1
   GlobalPopup_Login = 1
   GlobalPopup_Register = 1
   WindowEventLoad(locMainAddress)
   var myURL = document.URL 
	if (myURL.indexOf('Products.htm') != -1){LocalBuildTree()}
}   

function LocalSearch(pSearchText)
{
   var locTitle = window.location.href
   var locSearch = document.getElementById('txtsearch')   
   if (pSearchText != null) { locSearch.value = pSearchText }   
   if (locTitle.toLowerCase().indexOf('products') == -1)
   {
       setTimeout("LocalOnLoad()",1000); 
	   var locURL = Utility_URL()
	   var locSearchText = locSearch.value
       window.location.href = locURL+'/products.html?autosearch='+locSearch.value
   }    
   else
   {
	  WebSearch_Clear()
	  var locFilter = ''
	  var locList = document.getElementById('supplist')
	  if (locList != null)
	  {
		 var locIndex = locList.selectedIndex
		 if (locIndex != 0)
		 {
			locFilter = locList.options[locIndex].text
			locFilter = 'CompanyName = \''+locFilter+'\''
		 }   
	  }
	  WebDisplay_DataSearch('Search_Item.xsl','Divider_SearchDetails',2,'txtsearch',locFilter,90,Tree_RowPerPage('tree'),1)
   }
}
function LocalEnterKey(event)
{
   var locKey = Utility_EnterKey(event,'txtsearch',1)
   if (locKey == 13)
   {
      LocalSearch()
   }
}
function LocalCatalogue()
{
  Utility_URLRedirect('Products.html')
}  
function LocalBuildTree()
{
   var locObj = document.getElementById('Tree_ecat')
   if (locObj != null)
   {
      WebDisplay_TreeInit('Tree_ecat')
   }
   else
   {
      setTimeout("LocalBuildTree()",100);
   }
}



function imenus_data0(){


	this.menu_showhide_delay = 150
	this.show_subs_onclick = false
	this.hide_focus_box = false




   /*---------------------------------------------
   IE Transition Effects
   ---------------------------------------------*/


	this.subs_ie_transition_show = ""



/*[end data]*/}

