function getCookie(strkey,strDefault){

	var strtmp;
	var arrtmp;
	var name;
	var value;

	strtmp = document.cookie;

	while(strtmp.match(/ /)){
		strtmp = strtmp.replace(" ","");
	}

	arrtmp = strtmp.split(";");

	for(var cnt=0;cnt<arrtmp.length;cnt++ ) {
		name  = arrtmp[cnt].split("=")[0];
		name  = unescape(name);
		if(name == strkey){
			value = arrtmp[cnt].split("=")[1];
			value = unescape(value);
			return value;
		}
	}

	return strDefault;

}

function setCookie(strkey, strvalue) {

	var strcookie;
    strcookie = strkey + "=" + escape(strvalue) + ";";
    document.cookie = strcookie;

}
