var sendRequest = function x_sendRequest(page, e_id) {
	var container = Core.get(e_id);
	advAJAX.get({
		mimeType : "text/plain",
		url : (page),
		onInitialization : function(obj) {
		// show progress
		container.className = 'ajax-progress';
		},
		onComplete : function(obj) {
		// hide progress
		container.className = 'ajax-complete';
		},
		onSuccess : function(obj) {
		// put content
		container.innerHTML = obj.responseText;
		container.className = '';
		},
		onError : function(obj) {
		// show error
		container.className = 'ajax-error';
		container.innerHTML = '';
		}
	});
}

function tabs(where,url,active) {
	Core.get(active).firstChild.blur();
	var tabContent = where + '-tabs-content';
	var tabs = where + '-tabs';

	if ( where == 'top' ) {
		Core.get('news').className = '';
		Core.get('skypeme').className = '';
		Core.get('business').className = '';
		Core.get(active).className = 'selected';
		} else {
			if ( where == 'main' ) {
				Core.get('skypecasts').className = '';
				Core.get('publicchats').className = '';
				Core.get('forum').className = '';
				Core.get('buttons').className = '';
				Core.get(active).className = 'selected';
				}
			}
	sendRequest(url,tabContent);
	}

function checkform() {
	var error = false;
	var text = 'Please fix this errors:\n\n';
	var emailtext = '';

	x = Core.get('share-skypename');
	if ( (x.value == null) || (x.value.length < 2) )
	{
	//alert("Name empty");
	x.focus();
	x.className = 'star';
	error = true;
	text += '- Skype name empty.\n';
	} else {x.className = '';}

	var x = Core.get('share-email');
	if ( (x.value == null) || (x.value.length < 2) )
	{
	//alert("Check email field");
	x.focus();
	x.className = 'star';
	error = true;
	emailtext = '- email adress empty.\n';
	} else {x.className = '';}

if (! Core.validateEmail(x.value) )
	{
	//alert("Wrong email adress");
	x.focus();
	x.className = 'star';
	error = true;
	if ( ! emailtext ) { emailtext = '- wrong email address.\n';}
	} else {x.className = '';}

	//alert('Done');

	if ( error ) { alert(text + emailtext);return false;} else { return true;}


	}

