var global_slide_delay = window.gecko ? 0 : 200;

window.addEvent('domready', function() {
	new Drag.Move('sticker', {'limit': {x: [-100, 710], y: [-1,-1]}});
});

function switchClass(unde, veche, noua) {
	unde.className == veche ? unde.className = noua : unde.className = veche;
}

function switchText(unde, vechi, nou) {
	unde.innerText == vechi ? unde.innerHTML = nou : unde.innerHTML = vechi;
}

function checkForm() {
	var frm = document.contact;
	var emailFilter=/^.+@.+\..{2,3,4,6}$/;
	if(frm.nume.value == "" || frm.email.value == "" || frm.text.value == "") {
		alert("ERROR\r\nYou must fill in all the field marked with a star.\r\nYour e-mail is used only for contact purposes.\r\nDon\'t worry. I won\'t spam you.");
		return false;
	}
	else{
		return true;
	}
}

function Loader(metoda, elementu){
	unde = $(elementu);
	xy = unde.getCoordinates();
	
	switch(metoda){
		case 'set':
			unde.setStyles({
			   width: xy.width,
			   height: xy.height,
			   background: 'url(img/ajax-loader.gif) no-repeat center center'
			});
			unde.empty();
		break;
		
		case 'unset':
			unde.setStyles({
			   height: 'auto',
			   background: 'none'
			});
		break;
	}
}