function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "")
	document.cookie = curCookie
}
function getCookie(name) {
	var prefix = name + "="
	var cookieStartIndex = document.cookie.indexOf(prefix)
	if (cookieStartIndex == -1) return null
	
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length

	return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
function fixDate(date) {
	var base = new Date(0)
	var skew = base.getTime()
	if (skew > 0) date.setTime(date.getTime() - skew)
}
function paintdiv(number) {
	var fotomen = '\
		<DIV STYLE="position:absolute; left:0px; top:0px; width:100%; height:266px; clip:rect(0px 100% 100% 0px);">\
			<table border=0 height=100% width=100% cellspacing=0 cellpadding=0>\
				<tr><td>&nbsp;</td>\
				<td width=452 STYLE="text-align: RIGHT; vertical-align: BOTTOM;">\
					<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" \
						codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" \
						WIDTH="450" HEIGHT="180">\
						<PARAM NAME=movie VALUE="img/fotos.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent>\
						<PARAM NAME=bgcolor VALUE=#ffffff>\
						<EMBED src="img/fotos.swf" quality=high wmode=transparent bgcolor=#ffffff WIDTH="450" HEIGHT="180" \
						TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>\
					</OBJECT>\
				</td></tr></table></div>';
	
	var divs = '\
		<DIV STYLE="position:absolute; left:20px; top:0px; width:473; height:268px; clip:rect(0px 100% 100% 0px);">\
			<IMG src="img/up'+number+'_471-266-51.jpg" border=0 width=471 height=266></div>\
		<DIV STYLE="position:absolute; left:273px; top:266px; width:55; height:16px; clip:rect(0px 100% 100% 0px);">\
			<IMG src="img/down'+number+'_53-14-128.gif" border=0 width=53 height=14></div>';
	
	document.write(fotomen);
	document.write(divs);
}
function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		document.cookie = name + "=" + ((path) ? "; path=" + path : "") +	((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT"
	}
}


