
var pageTracker = _gat._getTracker("UA-3278294-1");
pageTracker._initData();
pageTracker._trackPageview();

function evalScript(scripts){
	try {
		if(scripts != ''){
			var script = "";
			scripts = scripts.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, function(){
					if (scripts !== null) script += arguments[1] + '\n';
					return '';});
			if(script) (window.execScript) ? window.execScript(script) : window.setTimeout(script, 0);
		}
		return false;
	}
	catch(e)
	{	alert(e)
	}
}

function callback() {
	new Ajax.Updater('callback_div','callback.php',{
		method:'get', evalScripts: 'true'}); 
	Effect.toggle('callback_container','appear');
}

function submit_callback() {
	new Ajax.Updater('callback_response','callback_submit.php',{
		method:'post',
		parameters: $('callback_form').serialize(),
		evalScripts: 'true'}); 
	return false;
}

function load_vcard(id,typ) {
	new Ajax.Request('functions.php?function=load_vcard&id=' + id + '&typ=' + typ, {
		method: 'get',
		onSuccess: function(r) {$('showinfo_' + id).update(r.responseText)}
	});


	Ajax.Responders.register({
		onCreate: function(){
			new Effect.Appear('showload_' + id);
		},
		onComplete: function(){
			new Effect.Fade('showload_' + id);
			new Effect.toggle('showinfo_' + id,'slide');
		}
	});
}

function show_menuitem(id) {
	if($(id).style.display == 'none') {
		new Effect.BlindDown(id);
	}
}
	

function image_slide_down(id) {
	for(i=1;i<10;i++) {
		if(document.getElementById('img_div_' + i).style.display != 'none') {
			alert('bla');
//			Effect.SlideUp('img_div_' + i,{duration: 0.5});
		}
	}

	Effect.SlideDown(id,{duration: 0.5});
}


