/***************************************************************
*  Copyright notice
*
*  (c) 2006 WIV GmbH (info@wiv-gmbh.de)
*  All rights reserved
*
*
***************************************************************/
/**
 * detailView-javascript for the 'Pferde.de-Relaunch 2006'-project
 *
 * @author	Andreas Richter <richter@wiv-gmbh.de>
 */


/*
 * the category tree class
 *
 */


function startpage_categoryTree(id) {
	
	this.id	= id;
	
	this.elements = new Array();
	
	
	this.addElement = function(newElement) {
		this.elements.push(newElement);
	}
	
	this.getElementsIdList = function() {
		var idList = '';
		for (var c=0; c<this.elements.length; c++) {
			var elementsIdList = this.elements[c].getIdList();
			idList += (idList && elementsIdList?',':'') + elementsIdList;
		}
		return idList;
	}
	
}


/*
 * the category class
 *
 */

function startpage_category(divId, uid) {
	
	this.divId = divId;
	this.uid = uid;
	this.checked = false;
	
	this.children = new Array();

	this.addElement = function(newElement) {
		this.children.push(newElement);
	}
	
	this.mouseOver = function() {
		document.getElementById(this.divId).className = document.getElementById(this.divId).className.replace(/Inactive/,"Active");		
	}

	this.mouseOut = function() {
		if (!this.checked) {
			document.getElementById(this.divId).className = document.getElementById(this.divId).className.replace(/Active/,"Inactive");		
		}
	}

	this.check = function(fromParent, parentValue) {
		if (fromParent) {
			this.checked = parentValue;
		}
		else {
			this.checked = this.checked?false:true;
		}
		if (this.checked) {
			document.getElementById(this.divId).style.backgroundImage = document.getElementById(this.divId).style.backgroundImage.replace(/Inactive/,"Active");	
			document.getElementById(this.divId).className = document.getElementById(this.divId).className.replace(/Inactive/,"Active");					
		}
		else {
			document.getElementById(this.divId).style.backgroundImage = document.getElementById(this.divId).style.backgroundImage.replace(/Active/,"Inactive");		
			document.getElementById(this.divId).className = document.getElementById(this.divId).className.replace(/Active/,"Inactive");		
		}
		for (var c=0; c<this.children.length; c++) {
			this.children[c].check(true, this.checked);
		}
	}
	
	this.getIdList = function() {
		var idList = (this.checked && this.children.length==0)?(String(this.uid)):'';
		for (var c=0; c<this.children.length; c++) {
			var childrenIdList = this.children[c].getIdList();
			idList += (idList && childrenIdList?',':'') + childrenIdList;
		}
		return idList;		
	}
	
}


var IE = document.all?true:false

if (!IE) document.captureEvents(Event.MOUSEMOVE)


/*
 * the price-range-slider class
 *
 */

function startpage_pricerangeSlider(maxId, minId, maxTextId, minTextId, maxValueId, minValueId, maxHeight, minHeight, stepsCount) {
	
	this.maxId 		= maxId;
	this.minId 		= minId;
	this.maxTextId	= maxTextId;
	this.minTextId 	= minTextId;
	this.maxValueId	= maxValueId;
	this.minValueId = minValueId;
	this.maxHeight  = maxHeight;
	this.minHeight  = minHeight;
	
	this.maxStep	= stepsCount;
	this.minStep 	= 0;
	
	this.maxPos		= minHeight - maxHeight;
	this.minPos		= minHeight - maxHeight;
	
	this.stepsCount	= stepsCount;
	this.steps 		= new Array();

	this.changeActive = false;
	this.activeType	= 'max';
	
	
	
	this.activate = function(type) { 
		this.changeActive = true;
		this.activeType = type;
		document.getElementById(type=='max'?this.maxValueId:this.minValueId).className	= document.getElementById(type=='max'?this.maxValueId:this.minValueId).className.replace(/Inactive/,"Active");				
	}
	this.deactivate = function() { 
		this.changeActive = false;
		document.getElementById(this.activeType=='max'?this.maxValueId:this.minValueId).className	= document.getElementById(this.activeType=='max'?this.maxValueId:this.minValueId).className.replace(/Active/,"Inactive");				
		this.activeType = 'none';
	}
	
	this.getPriceRanges = function() {
		if (this.minStep==0 && this.maxStep==this.stepsCount) {
			return false;
		}
		var idList = '';
		for (var d=parseInt(this.minStep); d<parseInt(this.maxStep); d++) {
			idList += (idList?',':'') + this.steps[d][2];
		}
		return idList;
	}
	
}


/*
 * the distance-map class
 *
 */


function startpage_distanceMap(pointId, cityId, distanceId, ringId, pointBottomX, pointBottomY, width, height) {
	
	this.pointId 		= pointId;
	this.cityId 		= cityId;
	this.distanceId 	= distanceId;
	this.ringId 		= ringId;
	this.pointBottomX 	= pointBottomX;
	this.pointBottomY 	= pointBottomY;
	this.width			= width;
	this.height			= height;
	
	this.actPointLeft	= 0;
	this.actPointBottom	= 0;
	this.distances 		= new Array();
	
	this.checkZip = function(zipField, sendURL, prefixId, regExp) {
		regExpCheck = new RegExp(regExp);
		if (zipField.value.match(regExpCheck)) {
			this.getZipCoordinates(zipField, sendURL, prefixId);
		}
		
	}
	
	this.getZipCoordinates = function(zipField, sendURL, prefixId) {
		var params = 'no_cache=1&'+ prefixId + '[zipcode]=' + zipField.value;
		params += '&'+ prefixId + '[width]='+String(this.width);
		params += '&'+ prefixId + '[height]='+String(this.height);
		
		thisArea = this;
		
		new ajax(sendURL, {postBody:params,onComplete:function() {
			var resultCode = getXMLValue(this.transport.responseText, 'resultcode');
			var city = getXMLValue(this.transport.responseText, 'city');
			var coordx = parseInt(getXMLValue(this.transport.responseText, 'coordx'));
			var coordy = parseInt(getXMLValue(this.transport.responseText, 'coordy'));
			
			if (resultCode > 0) {
				// handle error
				
			}
			else {

				// set point
				pointLeft 	= thisArea.pointBottomX + coordx;
				pointBottom = thisArea.pointBottomY + coordy;
				thisArea.actPointLeft 	= pointLeft;
				thisArea.actPointBottom = pointBottom;

				document.getElementById(thisArea.pointId).style.left 	= String(pointLeft) + 'px';
				document.getElementById(thisArea.pointId).style.bottom 	= String(pointBottom) + 'px';
				document.getElementById(thisArea.pointId).style.display = 'block';
				// set ring
				ring = thisArea.distances[document.getElementById(thisArea.distanceId).value];
				if (ring[0]) {
					ringLeft 	= pointLeft-ring[0];
					ringBottom 	= pointBottom-ring[0];
					document.getElementById(thisArea.ringId).style.left 	= String(ringLeft) + 'px';
					document.getElementById(thisArea.ringId).style.bottom 	= String(ringBottom) + 'px';
					document.getElementById(thisArea.ringId).style.display = 'block';
				}
				else {
					document.getElementById(thisArea.ringId).style.display = 'none';
				}
				
				// set city
				document.getElementById(thisArea.cityId).style.display = 'block';
				document.getElementById(thisArea.cityId).firstChild.replaceData(0,document.getElementById(thisArea.cityId).firstChild.nodeValue.length,city);
				
			}			
		}});			
		

	}
	
	this.setRing = function() {
		ring = this.distances[document.getElementById(this.distanceId).value];
		if (this.actPointLeft && this.actPointBottom && ring[0]) {
			ringLeft 	= this.actPointLeft-ring[0];
			ringBottom 	= this.actPointBottom-ring[0];
			document.getElementById(this.ringId).style.left 	= String(ringLeft) + 'px';
			document.getElementById(this.ringId).style.bottom 	= String(ringBottom) + 'px';
			document.getElementById(this.ringId).src = ring[1];
			document.getElementById(this.ringId).style.display = 'block';
		}
		else {
			document.getElementById(this.ringId).style.display = 'none';
		}
	}
	
}




/*
 * the form class
 *
 */

function startpage_form(formId) {
	
	this.formId = formId;
	this.values = new Array();
	
	this.submit = function() {
		
		for (var c=0; c<this.values.length; c++) {
			var valueId 		= this.values[c][0];
			var valueType		= this.values[c][1];
			var valueContainer 	= this.values[c][2];
			if (this.values[c].length>3) {
				var valueSpecial 	= this.values[c][3];
			}
			else {
				var valueSpecial	= false;
			}
			
			switch (valueType) {
				case "input":
					if (document.getElementById(valueContainer).value) {
						document.getElementById(valueId).value = document.getElementById(valueContainer).value;
					}
					else {
						if (valueSpecial) {
							document.getElementById(valueSpecial).value = '1';
						}
					}
				break;
				case "categoriesTree":
					document.getElementById(valueId).value = valueContainer.getElementsIdList();
				break;
				case "pricerange":
					if (priceRangeValue = valueContainer.getPriceRanges()) {
						document.getElementById(valueId).value = priceRangeValue;
					}
				break;
			}
		}
		
		document.getElementById(this.formId).submit();
	}
	
}



/*
 * the quickSearchMenu class
 *
 */

function startpage_quickSearchMenu() {
	this.formContainers = new Array();
}

/*
 * the quickSearchMenuButton class
 *
 */


function startpage_quickSearchMenuButton(buttonId, formContainerId, menu, active, activeImage, inactiveImage) {
	
	this.buttonId 			= buttonId;
	this.formContainerId	= formContainerId;
	this.menu				= menu;
	this.active 			= active;
	this.activeImage		= activeImage;
	this.inactiveImage		= inactiveImage;
	this.mousemoveMethod    = false;
	
	this.mouseOver = function() {
		document.getElementById(this.buttonId).style.backgroundImage = this.activeImage;
	}
	
	this.mouseOut = function() {
		if (!this.active) {
			document.getElementById(this.buttonId).style.backgroundImage = this.inactiveImage;
		}
	}
	
	this.switchForm = function(loadDivId, loadURL, loadParams) {
		var zIndex = 1;
		for (var c=0; c<this.menu.formContainers.length; c++) {
			document.getElementById(this.menu.formContainers[c].formContainerId).style.zIndex = zIndex;
			document.getElementById(this.menu.formContainers[c].buttonId).style.backgroundImage = this.menu.formContainers[c].inactiveImage;
			this.menu.formContainers[c].active = false;
			if (this.formContainerId != this.menu.formContainers[c].formContainerId) {
				zIndex++;
			}
			
			if (loadDivId && !document.getElementById(loadDivId).hasChildNodes()) {
				
				new ajax(loadURL, {postBody: loadParams, onComplete:function() {
					document.getElementById(loadDivId).innerHTML = this.transport.responseText;
				}});
				
			}
			
		}
		document.getElementById(this.formContainerId).style.zIndex = 6;
		document.getElementById(this.buttonId).style.backgroundImage = this.activeImage;
		this.active = true;
		if (this.mousemoveMethod) {
			document.onmousemove = this.mousemoveMethod;
		}
	}
	
}

var startpageQuickSearchMenu = new startpage_quickSearchMenu();
var startpageQuickSearchMenuButtonCommunity 	= new startpage_quickSearchMenuButton('wivPortalSystem_startPage_quickSearchMenuCommunity', 	'wivCommunity_startPage_quickSearch', startpageQuickSearchMenu, false, 'url(/fileadmin/pferde.de/images/startQuickSearchMenuCommunityActive.gif)', 'url(/fileadmin/pferde.de/images/startQuickSearchMenuCommunityInactive.gif)');
var startpageQuickSearchMenuButtonPferdemarkt 	= new startpage_quickSearchMenuButton('wivPortalSystem_startPage_quickSearchMenuPferdemarkt', 	'wivHorseMarket_startPage_quickSearch', startpageQuickSearchMenu, true, 'url(/fileadmin/pferde.de/images/startQuickSearchMenuPferdemarktActive.gif)', 'url(/fileadmin/pferde.de/images/startQuickSearchMenuPferdemarktInactive.gif)');
var startpageQuickSearchMenuButtonKleinanzeigen = new startpage_quickSearchMenuButton('wivPortalSystem_startPage_quickSearchMenuKleinanzeigen', 'wivClassifiedAdsMarket_startPage_quickSearch', startpageQuickSearchMenu, false, 'url(/fileadmin/pferde.de/images/startQuickSearchMenuKleinanzeigenActive.gif)', 'url(/fileadmin/pferde.de/images/startQuickSearchMenuKleinanzeigenInactive.gif)');
var startpageQuickSearchMenuButtonReiterferien 	= new startpage_quickSearchMenuButton('wivPortalSystem_startPage_quickSearchMenuReiterferien', 	'wivHolidays_startPage_quickSearch', startpageQuickSearchMenu, false, 'url(/fileadmin/pferde.de/images/startQuickSearchMenuReiterferienActive.gif)', 'url(/fileadmin/pferde.de/images/startQuickSearchMenuReiterferienInactive.gif)');
var startpageQuickSearchMenuButtonShopping 		= new startpage_quickSearchMenuButton('wivPortalSystem_startPage_quickSearchMenuShopping', 		'wivShopping_startPage_quickSearch', startpageQuickSearchMenu, false, 'url(/fileadmin/pferde.de/images/startQuickSearchMenuShoppingActive.gif)', 'url(/fileadmin/pferde.de/images/startQuickSearchMenuShoppingInactive.gif)');

startpageQuickSearchMenu.formContainers = new Array(
	startpageQuickSearchMenuButtonCommunity,
	startpageQuickSearchMenuButtonPferdemarkt,
	startpageQuickSearchMenuButtonKleinanzeigen,
	startpageQuickSearchMenuButtonReiterferien,
	startpageQuickSearchMenuButtonShopping
	);
	
	

	
function searchclick(div)
{
	var val=$(div).value;
	if(val.length<3) return;
	if(val=='Suchbegriff') return;
	location.href='http://community.pferde.de/content/suche_tag/index.html?TAG='+escape(val);
}	


var PPATH='http://community.pferde.de/content/';
var PAJAX='http://community.pferde.de/content/ajax/';




/*
 * the announcements slider class 
 *
 */
function startpage_announcementsSlider(count, contentId, tableId, leftArrowId, rightArrowId) {
	
	this.count 	= count;
	this.contentId = contentId;
	this.tableId = tableId;	
	this.leftArrowId = leftArrowId;
	this.rightArrowId = rightArrowId;
	this.announcementId;
	this.start	= 0;
	this.announcementsCount = 0;
	this.announcementsCountId = false;
	this.announcements = new Array();
	this.slideValue = 0;
	this.prefixId;
	this.origContentHeight;
	
	this.disabled = false;
	
	this.loadAnnouncements = function(start, loadAnnouncementsURL, prefixId) {
		var params = 'no_cache=1&' + prefixId + '[start]='+String(start)+'&'+'[count]='+String(count);
		
		if (start==this.start) {
			var direction = 'nomove';
			params += '&'+prefixId + '[firstLoad]=1';
			this.origContentHeight = document.getElementById('areaContent').offsetHeight;
		}
		else {
			var direction = start>this.start?'right':'left';
		}

		params += '&'+ prefixId + '[cookie]='+document.cookie;
		
		
		thisSlider = this;
		

		new ajax(loadAnnouncementsURL, {postBody:params,onComplete:function() {
			var announcements = getXMLObjects(this.transport.responseText, 'announcements', 'announcement', new Array('title','href','image'));
			for (c=0; c<announcements.length; c++) {
				announcements[c]['hasImage'] = announcements[c]['image']?true:false;
			}
			thisSlider.announcements = announcements;
			
			
			announcementsCount = parseInt(getXMLValue(this.transport.responseText, 'announcementscount'));
			if (announcementsCount) {
				thisSlider.announcementsCount = announcementsCount;
				if (thisSlider.announcementsCountId) {
					document.getElementById(thisSlider.announcementsCountId).firstChild.replaceData(0, document.getElementById(thisSlider.announcementsCountId).firstChild.data.length, thisSlider.announcementsCount);
				}			
			}
			start = parseInt(getXMLValue(this.transport.responseText, 'setstart'));
			if (start) {
				thisSlider.start = start;
			}
			
			
			if (direction=='nomove') {
				// load new announcements	
				var d=0;	
				for (var c=0; c<thisSlider.count; c++) {
					announcementContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
					while (announcementContainer.hasChildNodes()) {
						announcementContainer.removeChild(announcementContainer.firstChild);
					}
					if (d < thisSlider.announcements.length) {
						if (thisSlider.announcements[d]['hasImage']) {
							var newLink = document.createElement("a");
							newLink.setAttribute('href',thisSlider.announcements[d]['href']);
							var image = document.createElement("img");
							image.src = getXMLAttribute(thisSlider.announcements[d]['image'],'src');
							image.setAttribute('border','0');
							newLink.appendChild(image);				
							announcementContainer.appendChild(newLink);
						}

						var newLink = document.createElement("a");
						newLink.setAttribute('href',thisSlider.announcements[d]['href']);
						var title = document.createTextNode(thisSlider.announcements[d]['title']);
						newLink.appendChild(title);
						announcementContainer.appendChild(newLink);
						d++;
					}
				}	
				
				// handle arrows
				if ((thisSlider.start + thisSlider.count) >= thisSlider.announcementsCount) {
					document.getElementById(thisSlider.rightArrowId).src = document.getElementById(thisSlider.rightArrowId).src.replace(/Active\./,"Inactive.");
				}
				else {
					document.getElementById(thisSlider.rightArrowId).src = document.getElementById(thisSlider.rightArrowId).src.replace(/Inactive\./,"Active.");
				}
				if (!thisSlider.start) {
					document.getElementById(thisSlider.leftArrowId).src = document.getElementById(thisSlider.leftArrowId).src.replace(/Active\./,"Inactive.");
				}
				else {
					document.getElementById(thisSlider.leftArrowId).src = document.getElementById(thisSlider.leftArrowId).src.replace(/Inactive\./,"Active.");
				}
				
			
			}				
			
			if (direction=='right') {
				// load new announcements		
				var d=0;	
				for (var c=thisSlider.count; c<thisSlider.count*2; c++) {
					announcementContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
					while (announcementContainer.hasChildNodes()) {
						announcementContainer.removeChild(announcementContainer.firstChild);
					}
					if (d < thisSlider.announcements.length) {
						if (thisSlider.announcements[d]['hasImage']) {
							var newLink = document.createElement("a");
							newLink.setAttribute('href',thisSlider.announcements[d]['href']);
							var image = document.createElement("img");
							image.src = getXMLAttribute(thisSlider.announcements[d]['image'],'src');
							image.setAttribute('border','0');
							newLink.appendChild(image);				
							announcementContainer.appendChild(newLink);
						}

						var newLink = document.createElement("a");
						newLink.setAttribute('href',thisSlider.announcements[d]['href']);
						var title = document.createTextNode(thisSlider.announcements[d]['title']);
						newLink.appendChild(title);
						announcementContainer.appendChild(newLink);
						d++;
					}
				}	
				// slide to left...	
				thisSlider.slideValue = 0;
				thisSlider.slide = window.setInterval("startpage_slideAnnouncementsLeft()", 1);
				

				
			}
			if (direction=='left') {
				
				// copy left to right
				for (var c=0; c<thisSlider.count; c++) {
					sourceContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
					destinationContainer = document.getElementById(thisSlider.contentId+'Container'+String(c+thisSlider.count));
					while (destinationContainer.hasChildNodes()) {
						destinationContainer.removeChild(destinationContainer.firstChild);
					}
					if (sourceContainer.hasChildNodes()) {
						for (var d=0; d<sourceContainer.childNodes.length; d++) {
							destinationContainer.appendChild(sourceContainer.childNodes[d].cloneNode(true));
						}
					}
				}					

				
				// directly to left
				document.getElementById(thisSlider.tableId).style.left = '-575px';										
				
				// load new images		
				var d=0;	
				for (var c=0; c<thisSlider.count; c++) {
					announcementContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
					while (announcementContainer.hasChildNodes()) {
						announcementContainer.removeChild(announcementContainer.firstChild);
					}
					if (d < thisSlider.announcements.length) {
						if (thisSlider.announcements[d]['hasImage']) {
							var newLink = document.createElement("a");
							newLink.setAttribute('href',thisSlider.announcements[d]['href']);
							var image = document.createElement("img");
							image.src = getXMLAttribute(thisSlider.announcements[d]['image'],'src');
							image.setAttribute('border','0');
							newLink.appendChild(image);				
							announcementContainer.appendChild(newLink);
						}

						var newLink = document.createElement("a");
						newLink.setAttribute('href',thisSlider.announcements[d]['href']);
						var title = document.createTextNode(thisSlider.announcements[d]['title']);
						newLink.appendChild(title);
						announcementContainer.appendChild(newLink);
						d++;
					}
				}		
				
				// slide to right...	
				thisSlider.slideValue = 0;
				thisSlider.slide = window.setInterval("startpage_slideAnnouncementsRight()", 1);								
				
			}			
			
			
		}});		
					
		
	}	
	
	this.moveLeft = function(loadAnnouncementsURL, prefixId) {
		if (!this.disabled && this.start > 0) {
			this.disabled = true;
			this.loadAnnouncements(this.start - this.count, loadAnnouncementsURL, prefixId);
			this.start = this.start - this.count;
			if (!this.start) {
				document.getElementById(this.leftArrowId).src = document.getElementById(this.leftArrowId).src.replace(/Active\./,"Inactive.");
			}
			document.getElementById(this.rightArrowId).src = document.getElementById(this.rightArrowId).src.replace(/Inactive\./,"Active.");
		}
	}
	
	this.moveRight = function(loadAnnouncementsURL, prefixId) {
		if (!this.disabled && (this.start + this.count) < this.announcementsCount) {
			this.disabled = true;
			this.loadAnnouncements(this.start + this.count, loadAnnouncementsURL, prefixId);
			this.start = this.start + this.count;

			// handle arrows
			if ((this.start + this.count) >= this.announcementsCount) {
				document.getElementById(this.rightArrowId).src = document.getElementById(this.rightArrowId).src.replace(/Active\./,"Inactive.");
			}
			document.getElementById(this.leftArrowId).src = document.getElementById(this.leftArrowId).src.replace(/Inactive\./,"Active.");
		}
	}
	
}



function startpage_slideAnnouncementsLeft() {
	document.getElementById(thisSlider.tableId).style.left = '-'+String(thisSlider.slideValue) +'px';
	thisSlider.slideValue += (thisSlider.slideValue>=555 || thisSlider.slideValue<=20)?4:((thisSlider.slideValue>=525 || thisSlider.slideValue<=50)?6:8);
	if (thisSlider.slideValue>=575) {
		window.clearInterval(thisSlider.slide);
		
		// copy right to left
		for (var c=0; c<thisSlider.count; c++) {
			sourceContainer = document.getElementById(thisSlider.contentId+'Container'+String(c+thisSlider.count));
			destinationContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
			while (destinationContainer.hasChildNodes()) {
				destinationContainer.removeChild(destinationContainer.firstChild);
			}
			if (sourceContainer.hasChildNodes()) {
				for (var d=0; d<sourceContainer.childNodes.length; d++) {
					destinationContainer.appendChild(sourceContainer.childNodes[d].cloneNode(true));
				}
			}
		}
		
		// directly to right
		document.getElementById(thisSlider.tableId).style.left = '0px';	
		
		// clear right
		for (var c=thisSlider.count; c<thisSlider.count*2; c++) {
			announcementContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
			while (announcementContainer.hasChildNodes()) {
				announcementContainer.removeChild(announcementContainer.firstChild);
			}
		}
		thisSlider.disabled = false;
	}
}	


function startpage_slideAnnouncementsRight() {
	document.getElementById(thisSlider.tableId).style.left = String(0-575+thisSlider.slideValue) +'px';
	thisSlider.slideValue += (thisSlider.slideValue>=555 || thisSlider.slideValue<=20)?4:((thisSlider.slideValue>=525 || thisSlider.slideValue<=50)?6:8);
	if (thisSlider.slideValue>=575) {
		window.clearInterval(thisSlider.slide);
		
		// clear right
		for (var c=thisSlider.count; c<thisSlider.count*2; c++) {
			announcementContainer = document.getElementById(thisSlider.contentId+'Container'+String(c));
			while (announcementContainer.hasChildNodes()) {
				announcementContainer.removeChild(announcementContainer.firstChild);
			}
		}
		
		// directly to right
		document.getElementById(thisSlider.tableId).style.left = '0px';	
		
		thisSlider.disabled = false;
	}
}	


var startpageAnnouncementsSlider = new startpage_announcementsSlider(3, 'wivHorseMarket_startpageAnnouncements_sliderContent', 'wivHorseMarket_startpageAnnouncements_sliderContentTable', 'wivHorseMarket_startpageAnnouncements_sliderLeftArrow', 'wivHorseMarket_startpageAnnouncements_sliderRightArrow');

