//vtop by me :P
var __c_top90;
function initTop90t(t_msg,idsite){
	__c_top90 = new top90();
	__c_top90.__t_90_ids = idsite;
	__c_top90.__t_90_mesaj = t_msg;
	__c_top90.__t_90_vote();

}

function top90(){

		this.__t_90_ids = 0;
	this.__t_90_mesaj = "Votati acest sie in No1 Trafic ?";
	this.__t_90_siteVote = "http://www.no1.do.am/";
		this.__t_90_vote = function(){
		var __t_90_arataVot = true;
		var __t_90_ca = document.cookie.split(';');
		for(var __t_90_i=0;__t_90_i < __t_90_ca.length;__t_90_i++) {
			var __t_90_c = __t_90_ca[__t_90_i];
			while (__t_90_c.charAt(0)==' ') __t_90_c = __t_90_c.substring(1,__t_90_c.length);
			if (__t_90_c.indexOf('top90idSite') == 0) {
				if(__t_90_c.substring('top90idSite'.length + 1,__t_90_c.length) == this.__t_90_ids)
				__t_90_arataVot = false; // adica am aratat la om votu
			}
		}
		if(__t_90_arataVot){
			this.__t_90_setNospam() // setez cookie-ul
			this.__t_90_arataVot(); // arat alertul
		}
	}
	this.__t_90_setNospam = function (){
		var __t90__date = new Date();
		__t90__date.setTime(__t90__date.getTime()+(12*60*60*1000));
		var __t_90_expires = "; expires="+__t90__date.toGMTString();
		document.cookie = "top90idSite="+this.__t_90_ids+__t_90_expires+"; path=/";
	}
	this.__t_90_arataVot = function (){
		
		__t_90_x = ___getPageSize();
document.write ("<div id='top90mare' style='position:absolute;top:0px;left:0px;'></div>");
		document.getElementById('top90mare').innerHTML += "<a style='display:block;position:absolute;width:"+__t_90_x[0]+"px;height:"+__t_90_x[1]+"px;top:0;background:#FFFFFF;opacity:0.1;filter: alpha(opacity = 10)' id='top90div' href='"+ this.__t_90_siteVote + "board/" + this.__t_90_ids +"' target='_blank' onclick='top90out()'>&nbsp;</a>";
		document.getElementById('top90mare').innerHTML +=  "<div style='position:absolute;top:300px;left:300px;clear:both;width:300px;border:3px solid #000000;background:#FF9900;opacity:1;filter: alpha(opacity = 100);padding:10px;font-size:11px;font-family:verdana' id='top90vote'></div>";
		document.getElementById('top90vote').innerHTML = "<a style='display: block; position: absolute; top: 4px; right: 5px; font-weight: bold; color: gray; text-decoration: none;' href='javascript:;' onClick='fd_close()' >X</a></div>" + this.__t_90_mesaj;
		document.getElementById('top90vote').innerHTML += "<br /><br /><div style='text-align:center'><a href='"+ this.__t_90_siteVote + "board/" + this.__t_90_ids +"' style='color:#000000;width:100px;line-height:24px;border:3px solid #ffffff;display:block;text-align:center' target='_blank' onclick='top90out()'>Voteaza acum</a><br /></div>";
		


	}
	

}


function ___getPageSize() {
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth;
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else {
		pageHeight = yScroll;
	}
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){
		pageWidth = xScroll;
	} else {
		pageWidth = windowWidth;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	return arrayPageSize;
};
/**
/ THIRD FUNCTION
* getPageScroll() by quirksmode.com
*
* @return Array Return an array with x,y page scroll values.
*/
function ___getPageScroll() {
	var xScroll, yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
		xScroll = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
		xScroll = document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
		xScroll = document.body.scrollLeft;
	}
	arrayPageScroll = new Array(xScroll,yScroll)
	return arrayPageScroll;
};
/**
* Stop the code execution from a escified time in milisecond
*
*/


function top90out(){
	document.getElementById('top90mare').style.display = "none";
}
initTop90t(__top90_message, __top_90_idsite);



