

function removeHTMLTags(htmlText){
 	if(htmlText){
 		var strInputCode = htmlText;

 	 	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
 		 	return (p1 == "lt")? "<" : ">";
 		});
 		var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
 		alert("Output text:\n" + strTagStrippedText);
 	}
}

 function toggleSpinner(status)
{
 if (status) dojo.html.show('spinner');
 else dojo.html.hide('spinner');
 }


        function Close() {
            this.close();
        }

        function Check(target) {
            if (target.nextSibling.className == "menu_close") {
                target.nextSibling.className = "menu_open"
            }
            else if (target.nextSibling.className == "menu_open") {
                target.nextSibling.className = "menu_close"
            }
            if (target.className == "img_open") {
                target.className = "img_close"
            }
            else if (target.className == "img_close") {
                target.className = "img_open"
            }
            if (target.next().className == "menu_close") {
                target.next().className = "menu_open"
            }
            else if (target.next().className == "menu_open") {
                target.next().className = "menu_close"
            }
        }


// Wait Plugin for jQuery
// based on the Delay and Pause Plugin
 (function(jQuery) {
    jQuery.fn.wait = function(option, options) {
        var milli = 5000; 
        if (option && (typeof option == 'function' || isNaN(option)) ) {
            options = option;
        } else if (option) {
            milli = option;
        }
        // set defaults
        var defaults = {
            msec: milli,
            onEnd: options
        },
        settings = jQuery.extend({},defaults, options);

        if(typeof settings.onEnd == 'function') {
            this.each(function() {
                setTimeout(settings.onEnd, settings.msec);
            });
            return this;
        } else {
            return this.queue('fx',
            function() {
                var self = this;
                setTimeout(function() { jQuery.dequeue(self); },settings.msec);
            });
        }

    };
})(jQuery);


