
window.onbeforeunload = function() {
	// bla bla bla
}
window.onload = function()
{
	if (typeof(blnActivateSlideshow) != "undefined") if (blnActivateSlideshow == true) activateSlideshow();
	//if (typeof(intSpeedRotateSatisfiedCustomers) != "undefined") setTimeout("rotateSatisfiedCustomers()", intSpeedRotateSatisfiedCustomers);
	if (typeof(skipHideDivPopup) + "" == "undefined") skipHideDivPopup = false;
	if (typeof(bitShowFakePopup) + "" == "undefined") bitShowFakePopup = 0;
	if (typeof(blnHideDivFakePopup) + "" == "undefined") blnHideDivFakePopup = false;
	if (typeof(blnAlreadyPoppedUp) + "" == "undefined") blnAlreadyPoppedUp = false;
	if (typeof(blnSetCookies) + "" == "undefined") blnSetCookies = true;
	if (typeof(blnSkipMasterOverlay) + "" == "undefined") blnSkipMasterOverlay = false;

	runOnLoad();
	addBehaviour();
	setStyle();
	setPopupEvents();
	showPopup();
	setTimeout("addALTtoTitle()", 2000);
}


function runOnLoad()
{
	loc = "" + window.location.href;
	query = "" + window.location.search;
	host = "" + window.location.host;

	if ( bitShowFakePopup == 1 || query.indexOf("m=popup") != -1 )
	{
		document.onclick = function() { setTimeout('blnHideDivFakePopup=true; hideDivPopup()', 125); };

		dMasterOverlay = document.getElementById("divMasterOverlay");
		dPopupBox = document.getElementById("divPopupBox");

		//document.title = "" + dMasterOverlay + "," + dPopupBox;

		if (dPopupBox && dMasterOverlay)
		{
			//document.title = ".." + $(document).height();
			if (blnSkipMasterOverlay == false) dMasterOverlay.style.display = "block";
			//dMasterOverlay.style.height =  + "px";
			dPopupBox.style.display = "block";
		}
	}

	//if (document.getElementById("divMasterOverlay")) document.getElementById("divMasterOverlay").onclick = function() { setTimeout('blnHideDivFakePopup=true; hideDivPopup()', 125); };
}

function addEventToElement(obj, eventname, newcode, optional_phase)
{
	eventPhase = false; if (optional_phase) eventPhase = optional_phase;
	if (obj.attachEvent)
	{
		obj.attachEvent(eventname, newcode); // IE
	} else {		
		obj.addEventListener(eventname, newcode, eventPhase );// all other browsers
	}	
}

function addToWindowLoad(eventname, functionname)
{
	evt_1 = "";
	evt_2 = "";
	func = functionname;
	if (typeof(func) == "string") func = eval(func);

	if (eventname == "load" || eventname == "onload")		{ evt_1 = "load"; evt_2 = "onload" }
	if (eventname == "resize" || eventname == "onresize")	{ evt_1 = "resize"; evt_2 = "onresize" }

	if (evt_1 == "" || evt_2 == "") return;

	if( window.addEventListener ) {
	  window.addEventListener(evt_1,func,false);
	} else if( document.addEventListener ) {
	  document.addEventListener(evt_1,func,false);
	} else if( window.attachEvent ) {
	  window.attachEvent(evt_2,func);
	}
}

intSpeedRotateSatisfiedCustomers = 1000 * 10; // sekunder
function addBehaviour()
{
	elms = document.getElementsByTagName("*");
	for(i = 0, len = elms.length; i < len; i++)
	{
		elm = elms[i];
		if (elm.className.indexOf("jsButtonBehaviour") != -1)
		{
			elm.onmouseover = function() { this.src = this.src.replace('normal','hover');    };
			elm.onmouseout  = function() { this.src = this.src.replace('hover','normal');    };
			elm.onmousedown = function() { this.src = this.src.replace('hover','mousedown'); };
			if (elm.className.indexOf("jsButtonBehaviourStayHighlighted") == -1)
			{
				elm.onmouseup   = function() { this.src = this.src.replace('mousedown','hover'); };
			}
		}
		if (elm.className.indexOf("jsOnfocusblur") != -1)
		{
			elm.onfocus = function() { this.blur(); };
		}
	}
}

function changeClassName(obj, condition, classNameOn, classNameOff)
{
	if (condition)
	{
		obj.className = obj.className.replace(classNameOn, classNameOff);
	} else {
		obj.className = obj.className.replace(classNameOff, classNameOn);
	}
}

function activateSlideshow()
{
	if (typeof(blnBypassUgensBoligSlideShow) + "" == "undefined") blnBypassUgensBoligSlideShow = false;

	if (blnBypassUgensBoligSlideShow == false)
	{
		objUgensBoligOverlay = document.getElementById("divUgensBoligPlaceholder");
		if (objUgensBoligOverlay)
		{
			objUgensBoligOverlay.parentNode.removeChild(objUgensBoligOverlay);
			//objUgensBoligOverlay.style.display = "none"
		}

		objUgensBoliger = document.getElementById("ulUgensBoliger");
		if (objUgensBoliger)
		{
			objUgensBoliger.style.display = "block";
		}

		intSpeed = 3000;
		$(".ugens-bolig-slideshow").jCarouselLite({
			auto: intSpeed,
			speed: intSpeed,
			scroll: 1,
			visible: 2,
			beforeStart: function () {},
			afterEnd: function () { fadeOut_SatisfiedCustomers(); }
		});
	}
}

function pauseSlideshow() {
	clearInterval(autoScroll);
}

blnRotateSatisfiedCustomers = true;
intIndexSatisfiedCustomer = 0;
function fadeOut_SatisfiedCustomers()
{
	if (typeof(arrSatisfiedCustomers) + "" == "undefined") return;
	if (arrSatisfiedCustomers.length == 0) return;

	blnRotateSatisfiedCustomers = (blnRotateSatisfiedCustomers == true)?false:true;
	if (typeof(arrSatisfiedCustomers) + "" != "undefined" && blnRotateSatisfiedCustomers == true)
	{
		intIndexSatisfiedCustomer++;
		if (intIndexSatisfiedCustomer == arrSatisfiedCustomers.length) intIndexSatisfiedCustomer = 0;
	}

	if (blnRotateSatisfiedCustomers == true)
	{
		$('#span-satisfied-customer-headline, #span-satisfied-customer-text, #span-satisfied-customer-name').fadeOut('slow', function()
			{
				// Animation complete
				$('#span-satisfied-customer-headline').html ( arrSatisfiedCustomers[intIndexSatisfiedCustomer][0] );
				$('#span-satisfied-customer-text').html     ( arrSatisfiedCustomers[intIndexSatisfiedCustomer][1] );
				$('#span-satisfied-customer-name').html     ( arrSatisfiedCustomers[intIndexSatisfiedCustomer][2] );
				$('#satisfied-customers-readmore').attr('href', arrSatisfiedCustomers[intIndexSatisfiedCustomer][3] );

				$('#span-satisfied-customer-headline, #span-satisfied-customer-text, #span-satisfied-customer-name').fadeIn('slow', function()
					{
						// Animation complete
					}
				);
			}
		);

	}
}

cSC = 0;
function rotateSatisfiedCustomers()
{
	cSC++;
	if (typeof(arrSatisfiedCustomers) + "" != "undefined")
	{
		intIndexSatisfiedCustomer++;
		if (intIndexSatisfiedCustomer == arrSatisfiedCustomers.length) intIndexSatisfiedCustomer = 0;
		//fadeOut_SatisfiedCustomers();
		//setTimeout("rotateSatisfiedCustomers()", intSpeedRotateSatisfiedCustomers);
	}
	document.title = intIndexSatisfiedCustomer + "/" + arrSatisfiedCustomers.length + ", cSC:" + cSC;
}

function showhide_frontpage_login(objToShow, objToHide, objToFocus)
{
	if (typeof(objToShow) == "string")  objToShow  = document.getElementById(objToShow);
	if (typeof(objToHide) == "string")  objToHide  = document.getElementById(objToHide);
	if (typeof(objToFocus) == "string" && objToFocus != '') objToFocus = document.getElementById(objToFocus);
		
	objToShow.style.display = "block";
	objToHide.style.display = "none" ;
	if (objToFocus != '') objToFocus.focus();
}

function change_input(this_obj, this_value, this_event)
{
    if (this_event.type == "focus") {
        if (this_obj.value == this_value) {
            this_obj.value = "";
        }
        this_obj.style.color = "#000000";
		this_obj.style.fontStyle = "normal";
    } else {
        if (this_obj.value == "") {
			this_obj.style.fontStyle = "italic";
            this_obj.style.color = "#6d6d6d";
            this_obj.value = this_value;
        }
    }
}

function change_input_value(obj, condition, valueTrue, valueFalse)
{
	if (condition)
	{
		obj.value = valueTrue;
	} else {
		obj.value = valueFalse;
	}
}

/* ----- */

function showHint(strPosition, objId, msg)
{
	objInfo = document.getElementById("divInfoBox");
	if (!objInfo)
	{
		//alert("infobox not found");
		return;
	}
	offset = $('#' + objId).offset();
	objInfo.style.display = "block";
	objInfo.innerHTML = msg;

	if (strPosition == "left")
	{
		intPositionLeft = (offset.left - objInfo.offsetWidth - 10);
	} else {
		intPositionLeft = (offset.left + document.getElementById(objId).offsetWidth + 10);
	}
	

	objInfo.style.left = intPositionLeft + "px"; //(offset.left - objInfo.offsetWidth - 10) + "px";
	objInfo.style.top  = offset.top  + "px";
}

function hideHint()
{
	objInfo = document.getElementById("divInfoBox");
	if (objInfo) objInfo.style.display = "none";
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}
function getDocWidth() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollWidth, D.documentElement.scrollWidth),
        Math.max(D.body.offsetWidth, D.documentElement.offsetWidth),
        Math.max(D.body.clientWidth, D.documentElement.clientWidth)
    );
}
function setStyle()
{
	ua = navigator.userAgent;
	if (ua.indexOf("AppleWebKit") != -1)
	{
		if (document.getElementById("divImageBestil"))
		{
			document.getElementById("divImageBestil").style.fontSize = 16 + "px";
			document.getElementById("divImageBestil").style.letterSpacing = 0.8 + "pt";

		}
	}
	if (ua.indexOf("Opera") != -1)
	{
		if (document.getElementById("divImageBestil"))
		{
			document.getElementById("divImageBestil").style.fontSize = 16 + "px";
			document.getElementById("divImageBestil").style.letterSpacing = 0.7 + "pt";

		}
	}
}

function hideDivPopup(url,name,width,height,doblur)
{
	//document.title += ", skipHideDivPopup: " + skipHideDivPopup + ", blnHideDivFakePopup: " + blnHideDivFakePopup + ", blnAlreadyPoppedUp: " + blnAlreadyPoppedUp;

	objWindow = null;
	if (skipHideDivPopup == true) return; //&& blnHideDivFakePopup == false) return;
	if (blnHideDivFakePopup == true)
	{
		if (document.getElementById("divPopupBox"))
		{
			if (document.getElementById("divPopupBox")) document.getElementById("divPopupBox").style.display = "none";
			if (document.getElementById("divMasterOverlay")) document.getElementById("divMasterOverlay").style.display = "none";

			if (typeof(clsPopup) + "" != "undefined")
			{
				//document.title = "use popinfo";
				url = clsPopup.url;
				name = clsPopup.name;
				width = clsPopup.width;
				height = clsPopup.height;
				doblur = clsPopup.doblur;
			}

			if (url && blnAlreadyPoppedUp == false)
			{
				blnAlreadyPoppedUp = true;
				if (!name) name = "rhPopup";
				sSize  = "";
				sSize += (width?",width=" + width:"");
				sSize += (height?",height=" + height:"");

				sPosition = "";
				sLeft = "";
				sTop  = "";
				if (width && height)
				{

					sW = screen.availWidth ;
					sH = screen.availHeight;
					dW = width;
					dH = height;

					sLeft = ",left=" + ((sW-dW)/2);
					sTop  = ",top="  + (sH/2-dH/2);
				}
				sPosition = sLeft + sTop;

				sParams = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
	
				objWindow = window.open(url, name, sParams + sPosition + sSize);
				if (doblur) objWindow.blur();

				blnSetCookies = true;
				/*
				dtmDate = new Date();
				dtmDate.setDate(dtmDate.getDate() + 1);
				m = dtmDate.getMonth(); if (m == 0) m = 12;
				strDate = dtmDate.getFullYear() + "-" + m + "-" + dtmDate.getDate();
				setCookie('siteid_' + SiteId + '_expires', strDate, 1);
				*/
			}
		}
	}

	if (blnSetCookies == true && typeof(SiteId) + "" != "undefined" && typeof(strDate) + "" != "undefined")
	{
		dtmDate = new Date();
		dtmDate.setDate(dtmDate.getDate() + 1);
		m = dtmDate.getMonth(); if (m == 0) m = 12;
		strDate = dtmDate.getFullYear() + "-" + m + "-" + dtmDate.getDate();
		setCookie('siteid_' + SiteId + '_expires', strDate, 1);
	}

	return objWindow;
}

/* Cookie functions from http://www.w3schools.com/JS/js_cookies.asp */
	function getCookie(c_name)
	{
		if (document.cookie.length>0)
		  {
		  c_start=document.cookie.indexOf(c_name + "=");
		  if (c_start!=-1)
			{ 
			c_start=c_start + c_name.length+1 ;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length
			return unescape(document.cookie.substring(c_start,c_end));
			} 
		  }
		return "";
	}

	function setCookie(c_name,value,expiredays)
	{
		var exdate=new Date();
		if (!expiredays) expiredays = 365;
		exdate.setDate(exdate.getDate()+expiredays);
		document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toUTCString());
	}

	function deleteCookie(c_name)
	{
		setCookie(c_name,'',-1);
	}
/* /Cookie functions from http://www.w3schools.com/JS/js_cookies.asp */

function setPopupEvents()
{
	dPopupBox = document.getElementById("divPopupBox");
	if (dPopupBox != null)
	{

		dPopupBox.onclick = function()
		{
			skipHideDivPopup=true;
			blnHideDivFakePopup=false;
		}

		dClosePopup = document.getElementById("divClosePopup");
		if (dClosePopup != null)
		{
			dClosePopup.onclick = function()
			{
				blnHideDivFakePopup = true;
				blnAlreadyPoppedUp=true;
				setCookie('siteid_' + SiteId + '_expires',strDate, 365);
				hideDivPopup();
				document.getElementById('divPopupBox').style.display = 'none';
				if (document.getElementById('divMasterOverlay')) document.getElementById('divMasterOverlay').style.display = 'none';
			}
		}

		aShowNoMore = document.getElementById("aDoNotShowAgain");
		if (aShowNoMore != null)
		{
			aShowNoMore.onclick = function()
			{
				setCookie('no-more-popups','1', 365);
				setCookie('siteid_' + SiteId + '_expires',strDate365, 365);
				blnHideDivFakePopup = true;
				blnAlreadyPoppedFakePopup = true;

				dMasterOverlay = document.getElementById("divMasterOverlay");
				if (dMasterOverlay) dMasterOverlay.style.display = "none";

				dPopupBox = document.getElementById("divPopupBox");
				if (dPopupBox) dPopupBox.style.display = "none";

				return false;
			}
		}
		
	}
}


function showPopup()
{
	if (document.getElementById("divPopupBox"))
	{
		d = document.getElementById("divPopupBox");
		if (d.style.visibility != "visible" && d.className.indexOf("jsShowOnLoad") != -1)
		{
			d.style.visibility = "visible";
		}
	}
}

function changeHTML(data)
{
	/*
	#divPopupBox
	*/

	alert(data);

	/*
	$.get('/2011/asp/popup-01-inline.asp', function(data) {
	  $('#divPopupBox').html(data);
	  alert('Load was performed.');
	});
	*/

}


/*

$.ajax({
        data: parameters,
        type: "GET",
        url: '/2011/asp/popup-01-inline.asp',
        timeout: 20000,
        contentType: "application/x-www-form-urlencoded;charset=ISO-8859-1",
        success: changeHTML
});

*/

function submit_formVilsoe(blnIsPopUnder)
{
	//alert("blnIsPopUnder: " + blnIsPopUnder);
	f = document.getElementById("formVilsoe");
	if (f)
	{

		// set params
		opkald		= (f.opkald.checked)?1:0;
		skema		= (f.skema.checked)?1:0;
		nyhedsbrev	= (f.nyhedsbrev.checked)?1:0;

		p = "?"; // Post
		p += "opkald=" + opkald;
		p += "&skema=" + skema;
		p += "&nyhedsbrev=" + nyhedsbrev;

		navn		= "" + f.navn.value;
		email		= "" + f.email.value;
		telefon		= "" + f.telefon.value;
		gade		= "" + f.gade.value;
		postnummer	= "" + f.postnummer.value;
		bynavn		= "" + f.bynavn.value;
		
		q = ""; // Query
		q += "navn=" + navn;
		q += "&email=" + email;
		q += "&telefon=" + telefon;
		q += "&gade=" + gade;
		q += "&postnummer=" + postnummer;
		q += "&bynavn=" + bynavn;

		p += "&" + q;


		q = ""; // Query
		q += "navn=" + escape(navn);
		q += "&email=" + escape(email);
		q += "&telefon=" + telefon;
		q += "&gade=" + escape(gade);
		q += "&postnummer=" + postnummer;
		q += "&bynavn=" + escape(bynavn);

		q = "?" + q;

		q += "&popunder=" + blnIsPopUnder;

		//alert("p: " + p + "\n---\nq:" + q);

		// submit info via ajax
		$.ajax({
		  type: 'POST',
		  url: '/global/popup/gui/gui.koeberhjaelp.asp',
		  data: p,
		  contentType: "application/x-www-form-urlencoded;charset=ISO-8859-1",
		  success: function() { changeHTML('#divPopupBox',q) } // switch "page"
		});
	}
	return false;
}

function changeHTML(selector,param)
{
	url = '/2011/asp/popup-01-inline.asp' + param;
	$.get(url, function(data)
		{
			$(selector).html(data);
			if (document.getElementById("koeberpostnr") && document.getElementById("koeberby"))
			{
				//checkPostnummerPopup( document.getElementById("koeberpostnr"), document.getElementById("koeberby") );
			}
			setPopupEvents();
		}
	);
}

if (typeof jQuery != 'undefined')
{
	$(document).ready(function(){

		$('textarea[class*=jsToggleDefaultValue]').focus(function(){
			
			var t = $(this);
		
			if (typeof t.attr('default_value') == 'undefined' || t.val() == t.attr('default_value')) {
				t.attr('default_value', t.val()).val('');
			}

			t.css({'font-style':'normal', 'color':'#000000'});

			t.blur(function(){
				
				if (t.val() == '' || t.val() == t.attr('default_value')) {
					t.css({'font-style':'italic', 'color':'#999999'});
					t.val(t.attr('default_value'));
				}

			})

		})

	})

}

//Bruges til at fjerne ikke-numeriske værdier fra indtastningsfelter
function parseNumber(el) {

	el.value = parseInt(el.value.replace(/[^0-9]/g,""));
	if (isNaN(el.value)) el.value = '';

}

function inArray(array,element)
{
	for(elm in array)
	{
		if (elm == element)
		{
			return true;
		}
	}
	return false;
}




// onchange -> onbeforeunload

var hasChanged = false;

displayUnload = function(formId) {

	errorMessage = function() {
		return 'Du har lavet ændringer, uden at gemme.';
	};

	bindErrorMessage = function() {
		if (hasChanged) {
			return errorMessage();
		}
	};

	unbindErrorMessage = function() {
		$(window).unbind('beforeunload');
	};

	$('#' + formId).find('textarea, input, select').live('change', function(){
		hasChanged = true;
	});

	// http://www.opera.com/support/kb/view/827/
	try {
		opera.setOverrideHistoryNavigationMode('compatible');
		history.navigationMode = 'compatible';
	} 
	catch(e) {
	};

	$(window).bind('beforeunload', bindErrorMessage);
	$('#' + formId).find('input[type=submit], input[type=image]').live('click', unbindErrorMessage);					

};

function validate_lynsoegning(f)
{
	if (f.intejendomtypeid.selectedIndex == 0 && f.intkontantpris2.selectedIndex == 0 && f.RegionID.selectedIndex == 0)
	{
		alert("Vælg venligst mindst 1 søgekriterie.");
		return false;
	} else {
		return true;
	}
}



function showhideMasterOverlay(onoff)
{
	if (document.getElementById("divMasterOverlay"))
	{
		overlay = document.getElementById("divMasterOverlay");
		if (onoff == 1)
		{
			overlay.style.display = "block";
			overlay.style.height = $(document).height() + "px";
			overlay.style.width  = $(document).width()  + "px";

		} else {
			overlay.style.display = "none";
		}
	}
}
/*
		$(document).ready(function()
		{
			showhideMasterOverlay(1);
		})

*/

function selectAllCheckboxes(frm)
{
	if (typeof(frm) == "string") frm = document.getElementById(frm);
	if (!frm) return;

	els = frm.elements;
	for(i = 0, len = els.length; i < len; i++)
	{
		el = els[i];
		if (el.type == "checkbox") el.checked = true;
	}
}
function deselectAllCheckboxes(frm)
{
	if (typeof(frm) == "string") frm = document.getElementById(frm);
	if (!frm) return;

	els = frm.elements;
	for(i = 0, len = els.length; i < len; i++)
	{
		el = els[i];
		if (el.type == "checkbox") el.checked = false;
	}
}

function addALTtoTitle()
{
	objs = document.getElementsByTagName("*");
	for(i = 0, len = objs.length; i < len; i++)
	{
		obj = objs[i];
		alt = obj.getAttribute("alt");
		if (alt != null && alt.replace(/ /g,"") != "")
		{
			title = obj.getAttribute("title");
			if (title == null)
			{
				obj.title = " " + alt + " ";
			}
		}
	}
}

/* ********** jqueryFadeElements ********** */

	/*
	function jqueryFadeElements(strSelectorsElementsToFade,intIndex,intMS)
	{
		var arrElements = $(strSelectorsElementsToFade).toArray();
		if (arrElements.length > 1)
		{
			if (!intIndex || isNaN(intIndex)) intIndex = 0;
			if (intMS == -1) // -1 = skip this fade and show next according to fadetime
			{
				intMS = 0;
				intIndex++;
				if (intIndex > arrElements.length - 1) intIndex = 0;
			} else {
				$(arrElements[intIndex]).fadeOut("slow");
				intIndex++;
				if (intIndex > arrElements.length - 1) intIndex = 0;
				$(arrElements[intIndex]).fadeIn("slow");
				intMS = $(arrElements[intIndex]).attr("fadetime");
			}
			setTimeout("jqueryFadeElements('" + strSelectorsElementsToFade + "', " + intIndex + ")", intMS);
		};
	}
	*/

	jqueryFadeElementsPause = false; jqueryFadeElementsArgs = {};
	function jqueryFadeElementsRotationPause()    { jqueryFadeElementsPause = true; }
	function jqueryFadeElementsRotationContinue() { jqueryFadeElementsPause = false; jqueryFadeElements(null,null,null,true); }
	function jqueryFadeElements(strSelectorsElementsToFade,intIndex,intMS,blnContinueFromPause)
	{
		if (jqueryFadeElementsPause == true)
		{
			jqueryFadeElementsArgs = {
				sSelector : arguments[0],
				iIndex : arguments[1],
				iMS : arguments[2]
			};
			return;
		} else {
			if (blnContinueFromPause == true)
			{
				strSelectorsElementsToFade = jqueryFadeElementsArgs.sSelector;
				intIndex = jqueryFadeElementsArgs.iIndex;
				intMS = jqueryFadeElementsArgs.iMS;
			}
		}

		var arrElements = $(strSelectorsElementsToFade).toArray();
		if (arrElements.length > 1)
		{
			if (!intIndex || isNaN(intIndex)) intIndex = 0;
			if (intMS == -1) // -1 = skip this fade and show next according to fadetime
			{
				intMS = 0;
				intIndex++;
				if (intIndex > arrElements.length - 1) intIndex = 0;
			} else {
				$(arrElements[intIndex]).fadeOut("slow");
				intIndex++;
				if (intIndex > arrElements.length - 1) intIndex = 0;
				$(arrElements[intIndex]).fadeIn("slow");
				intMS = $(arrElements[intIndex]).attr("fadetime");
			}
			setTimeout("jqueryFadeElements('" + strSelectorsElementsToFade + "', " + intIndex + ")", intMS);
		};
	}

/* ********** /jqueryFadeElements ********** */
