var myAnim1 = null;var myAnim2 = null;var GlobalAnim = null;var GlobalAnimTimer = 1;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('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+'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>')
document.write('<sc'+'ript');document.write(' type="text/javascript"');document.write(' language="JavaScript"');document.write(' src="'+locAddress+'JavaScriptBasket.js">');document.write('</sc'+'ript>')
setTimeout("TimerLoad()",1000)

function TimerLoad(){
  var locData = document.getElementById('ECAT_ID')
  if (locData != null){
  	   GlobalTreeNoImage = 1
      WindowEventLoad(locMainAddress)
      LocalInit()
  }
  else{setTimeout("TimerLoad()",1000)}
}  
function Local_TopLink(pInfo1,pInfo2){
 if (pInfo1==2){
  var locObj=document.getElementById('txtsearch')
  locObj.value=pInfo2
  LocalSearch()
} }
function LocalInit(){
    GlobalPopup_XPos = Utility_ScreenMiddle(1,400)
    GlobalPopup_YPos = 20
    GlobalPopup_Login = 1
    GlobalPopup_Register = 1
    GlobalPopup_ProductDetails = 1
   
    GloInfo4_ExternalAuctionPage = 'index_Duroauction.html'
    var locURL = document.URL.toLowerCase()	
    if (locURL.indexOf('products_durowin.html') != -1) { 
    	Utility_HighlightSet(3,'TD_Menu1','TD_Menu','button_middle')
    	Utility_AttributeUpdate(3,'TD_Menu1','images/Menu/bottom_menu_over_01.jpg')
    }	     
	else if (locURL.indexOf('products_duro_aluminium.html') != -1) {
		Utility_HighlightSet(3,'TD_Menu2','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu2','images/Menu/bottom_menu_over_01.jpg')
	}	        
	else if (locURL.indexOf('products_wispeco.html') != -1) { 
		Utility_HighlightSet(3,'TD_Menu3','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu3','images/Menu/bottom_menu_over_01.jpg')
	}	           
	else if (locURL.indexOf('products_bellagio.html') != -1) { 
		Utility_HighlightSet(3,'TD_Menu4','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu4','images/Menu/bottom_menu_over_01.jpg')
	}	           
	else if (locURL.indexOf('products_hardware.html') != -1) { 
		Utility_HighlightSet(3,'TD_Menu5','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu5','images/Menu/bottom_menu_over_01.jpg')
	}	           
	else if (locURL.indexOf('products_durodiy.html') != -1) { 
		Utility_HighlightSet(3,'TD_Menu6','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu6','images/Menu/bottom_menu_over_01.jpg')
	}	           
	else if (locURL.indexOf('products_durowin_paint.html') != -1) { 
		Utility_HighlightSet(3,'TD_Menu7','TD_Menu','button_middle')
		Utility_AttributeUpdate(3,'TD_Menu7','images/Menu/bottom_menu_over_01.jpg')
	}	  
	var locObj = document.getElementById('Divider_LocalLogin')
	if (locObj!=null){locObj.style.position = 'absolute';locObj.style.visibility = 'visible';Utility_setPos(locObj,60,130)}
}
function LocalHidePopup(){document.getElementById('Divider_AuctionPopup').style.visibility='hidden'}
function LocalAuctionOption(pMode){
if (pMode == 1){
 GloInfo4_ExternalAuction = 1
 LocalFnc(1)
}
if (pMode == 2){
  GloInfo4_ExternalAuction = 1
  LocalFnc(5)
}}
function LocalUserDetails(){Utility_Divider(1,'Divider_ViewProduct',1)}
function LocalFnc(pMode){
    var locURL = document.URL.toLowerCase()
	if (locURL.toLowerCase().indexOf('products_') == -1)
	{
	    //------ Auto search -------------
	    var locMode = ''
	    locURL = Utility_URL()	 
	    if (pMode == 1) {locMode='displaylogin'}
	    if (pMode == 2) {locMode='displayregister'}
	    if (pMode == 3) {locMode='basketcurrent'}	    
	    if (pMode == 3) {locMode='baskethistory'}	    	    
	    if (pMode == 5) {locMode='productrequest'}	    	    
        window.location.href = locURL+'/Products_Durowin.html?autodisplay='+locMode
		return
	}
	if (pMode == 1)
	{
		WebDisplay_UserLogin()
	}
    else if (pMode == 2)	
    {
    	WebDisplay_UserRegister()
    }
    else if (pMode == 3)	
    {
    	BasketDisplayCurrent(1,'QuoteDebtor')
    }
    else if (pMode == 5)	
    {
    	//--------- Product Request --------
	    WebDisplay_ProductRequest('Product_Request.xsl','Divider_RegisterWindow','ProductRequest_')    	
    }
}
function LocalTree(pSection,pStylesheet){
  var locStatement = 'SELECT ID,PARENTID,NAME FROM dbo.Product WHERE (Name = \''+pSection+'\')'
  var xmlString = DataFnc_LoadSQL('PRODUCT',1,'',16,locStatement,0,0)
  var locParentID = UtilityXML_ExtractValue(xmlString,'id')          
  var locParentName = UtilityXML_ExtractValue(xmlString,'id')          
  WebDisplay_ItemChildren(locParentID, 2, 'short', 1, 2,pStylesheet,locParentName,0,'Tree_ecat',0) 
  //locStatement = 'SELECT ID,PARENTID,NAME FROM dbo.Product WHERE (PARENTID = \''+locParentID+'\')'  
  //xmlString = DataFnc_LoadSQL('PRODUCT',1,'',16,locStatement,0,0)
  //WebFnc_TransformItemChildren(pStylesheet,'Divider_ProductDetails',xmlString,0,100,1,0,locParentID,locParentName) 
}
function LocalBasketUpdate(){}
function LocalSearch(){
 var locURL = document.URL.toLowerCase()
 if (locURL.toLowerCase().indexOf('products_') != -1){WebDisplay_DataSearch('Search_Item.xsl','Divider_ProductDetails',2,'txtsearch','',GlobalMemory_Search,Tree_RowPerPage('Tree_ecat'),1,'navsearch')}
 else{
   var locObj = document.getElementById('txtsearch')
   locURL = Utility_URL()	 
   window.location.href = locURL+'/Products_Durowin.html?autosearch='+locObj.value
} }
function LocalQuickSearch(pText){
  var locObj = document.getElementById('txtsearch')
  if (locObj != null){
    locObj.value = pText
    WebDisplay_DataSearch('Search_Item.xsl','Divider_ProductDetails',2,'txtsearch','',GlobalMemory_Search,25,1,'navsearch')
} }
function LocalEnterKey(event){
   var locKey = Utility_EnterKey(event,'txtsearch',1)
   if (locKey == 13){LocalSearch()}
}
function LocalMenu(pObjID,pImage){
 var locObj = pObjID
 locObj.background = pImage
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
node7 = true
function hscrolldata0()
{

    /*---------------------------------------------
    Scroll Dimensions (Note: Does not include container padding)
    ---------------------------------------------*/

	this.container_width = 470
	this.container_height = 20


   /*---------------------------------------------
    Timing and Animation Speed
    ---------------------------------------------*/


	this.initial_scroll_delay = 0			//measured in seconds

	this.animation_delay = 20			//measured in milliseconds (1/1000)
	this.animation_jump = 2				//measured in pixels, must be > 1

	this.animation_delay_mac = 25			//measured in milliseconds (1/1000)
	this.animation_jump_mac = 4			//measured in pixels, must be > 1


    /*---------------------------------------------
    Scroll Container Styles and Padding
    ---------------------------------------------*/


	this.container_padding = "5,10,0,10"
	this.container_styles = "text-align:center; background-image:url(hm_bg_example1.gif);";



    /*---------------------------------------------
    Item Styles and Padding
    ---------------------------------------------*/

	/* Note: this.Item_styles apply to all standard content in the scroll, while this.item_link_styles apply to content
                 within hyperlink tags only.  */

	this.message_gap = 0;

	this.item_styles = "color:#222222; text-decoration:none; font-family:Tahoma; font-size:12px; border-style:none;border-width:0px;";
	this.item_link_styles = "color:#222222; text-decoration:none; font-family:Tahoma; font-size:12px; border-style:none;border-width:0px;";
	this.item_link_hover_styles = "color:#000000; text-decoration:none; font-family:Tahoma; font-size:12px; border-style:none;border-width:0px;";

}

