function get_cookie(name , value) {
	if (document.cookie.length>0){
		c_start=document.cookie.indexOf(name + "=");
		if (c_start!=-1){
			c_start=c_start + 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));
		}
	}
	set_cookie(name, value, 30);
	return value;
}

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


function get_hash(name,value){
	hash=window.location.hash.substring(1);
	keys=hash.split("&");
	for(var i=0; i < keys.length; i++) {
		tag=keys[i].split("=")[0];
		if (tag==name) {
			return keys[i].split("=")[1];
		}
	}
	return value;
}

function set_hash(hash){
	window.location.hash=''+hash;
	return false;
}

function Delete_Cookie( name, path, domain ) {
if ( get_cookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}