vcoop_http_root='http://www.dkpod.com/';
vcoop_img_root=vcoop_http_root+'img/';
vcoop_cookie_root='/';

// config htmlarea
_editor_url=vcoop_http_root+'htmlarea/';

vcoop_editors = new Array();
vcoop_editors_n = 0;

// config overlib
ol_closeclick = 1;
ol_close = "[X]";
ol_width = 250;
ol_border = 3;

ol_bgcolor = '#5F8197';
ol_capcolor = '#ffffff';
ol_fgcolor = '#6C93AD';
ol_closecolor = '#f0f0f0';


function vcoop_set_cookie (name, value, duration) {
	var today = new Date();
	var expire = new Date();

	cookie_value = name+'='+escape(value);
	if (duration != null) {
		expire.setTime (today.getTime() + duration);
		cookie_value = cookie_value+';expires='+expire.toGMTString();
	}
	cookie_value = cookie_value+';path='+vcoop_cookie_root;

	document.cookie = cookie_value;
}

function vcoop_get_cookie (name) {
	var cookie = ''+document.cookie;
	var pos = cookie.indexOf (name);
	if ( (pos == -1) || (name == '') ) {
		return '';
	}

	var pos1 = cookie.indexOf (';', pos);
	if (pos1 == -1)  {
		pos1 = cookie.length; 
	}
	ret = unescape (cookie.substring (pos + (name.length + 1), pos1));

	return ret;
}

function vcoop_update_editors_content () {
	if (vcoop_editors_n > 0) {
		for (i = 1; i <= vcoop_editors_n; i++) {
			vcoop_editors[i]._textArea.value = vcoop_editors[i].getHTML();
		}
	}
}

function popup_aide(page) {
	window.open(vcoop_http_root+'static/'+page+'.html?popup=1','popup_aide','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=250,height=400');
}

