	hs.allowMultipleInstances = false;
	hs.loadingText = 'laden';
	hs.loadingTitle = '';
	hs.focusTitle = '';
	hs.fullExpandTitle = '';
	hs.restoreTitle = '';
	hs.graphicsDir = 'fileadmin/web-applications/includes/js/highslide/graphics/';
	hs.transitions = ['expand', ''];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = false;
	hs.wrapperClassName = 'borderless';
	hs.showCredits = false;
	hs.dimmingOpacity = 0.4;	
	if (hs.addSlideshow) hs.addSlideshow({
		interval: 5000,
		repeat: false,
		useControls: false,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: false
		}
	});

var counter = function(clef){
Params = 'clef='+clef;
new Ajax.Updater(this, 'index.php?eID=tx_mseidtest_pi1&id=458&type=ajax_click_meter', { method: 'get', parameters: Params });
}

function mycarousel_initCallback(carousel)
{
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
});
};
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
		visible: 4,
		wrap: 'last',
/*		auto: 10,				*/
		animation: 500,
		initCallback: mycarousel_initCallback
    });
});
function calc(f,maxLength) {
                clipped = false;
if (!maxLength) maxLength = 100;
//                

                if (f.message.value.length > maxLength) {
                f.message.value = f.message.value.substring(0,maxLength);
                    charleft = 0;
                    clipped = true;
                        txtd = "Ndak isa nulis lagi";
                } else {
                        charleft = maxLength - f.message.value.length;
                        txtd = "Tersisa " + charleft + " karakter";
                }

       f.quota.value = charleft;
                return clipped;
}
	function BVBLink (object, url)												
	{
		new Ajax.Updater(object, url, { method: 'get' });
	}	

window.name = "main";

function DoSmiley(addSmiley, messageDef,fieldName){
	var addSmiley, messageDef, revisedMessage,fieldName, el;
    el = document.getElementById(fieldName);
	var currentMessage = el.value;
	if(currentMessage==messageDef){currentMessage='';}
	revisedMessage = currentMessage+addSmiley;

        el.value=revisedMessage;
        el.focus();		

	return;
}
function stristr( haystack, needle, bool ) {
    var pos = 0;
    haystack += '';
    pos = haystack.toLowerCase().indexOf( (needle+'').toLowerCase() );
    if( pos == -1 ){
        return false;
    } else{
        if( bool ){
            return haystack.substr( 0, pos );
        } else{
            return haystack.slice( pos );
        }
    }
}
function showhide(listID)
{
	var show;
	if(document.getElementById(listID).style.display == "show")
	{
		if(document.getElementById(listID).style.display == "show") {
			document.getElementById(listID).style.display = "";
			show=1;
		}else{
			document.getElementById(listID).style.display = "none";
			show=0;			
		}
	}
	else
	{
		if(document.getElementById(listID).style.display == "none") {
			document.getElementById(listID).style.display = "";
			show=1;			
		}else{
			document.getElementById(listID).style.display = "none";
			show=0;			
		}
	}
	if (show)
	{
		jQuery(document).ready(function(){
		jQuery(document.getElementById(listID)).slideDown('slow', function(){
		});
		});								
	}
	else
	{
		jQuery(document).ready(function(){
		jQuery(document.getElementById(listID)).slideUp('slow', function(){
		});
		});									
	}	
}
var loggedin_user_options = {
	dimmingOpacity: 0
};


// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
	slideshowGroup: 'slideshow',
	interval: 3000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: .40,
		position: 'bottom center',
		hideOnMouseOut: true
	}
});
hs.transitions = ['expand'];
hs.Expander.prototype.onMouseOut = function (sender) {
	if (sender.a.className == 'loggedin_user_options highslide-active-anchor')   sender.close();
};
hs.Expander.prototype.onAfterExpand = function (sender) {
	if (sender.a.className == 'loggedin_user_options highslide-active-anchor' && !sender.mouseIsOver) sender.close();
	if (stristr(sender.a.id,'thumb'))
	{
	   var clef = this.a.id.replace(/^thumb/, '');
	   if (clef) counter(clef);
	}
};
