function swLang(lang) {
	location.href ='?langsw='+lang;
}

function swLoc(section) {
	document.getElementById('location').className = 'nag'+section;
}

function gotoContact() {
	location.href='?,,8';
}

function submitForm() {
	document.getElementById('form').submit();
}
 
function historyGo(num) {
 	history.go(num);
}
 
function textareaMaxLength(object, maxlength) {
	if (object.value.length>maxlength)
		object.value=object.value.substring(0,maxlength)
}

function getCookie(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1 ;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return ""
}

function setCookie(c_name,value,expiredays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}

function delCookie(c_name) {
	var exdate=new Date();
	var value="";
	var expiredays = 1;
	exdate.setDate(exdate.getDate()-10);
	document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}