function f_open_window_max( aURL, aWinName ) { window.open(aURL, aWinName, 'fullscreen=yes, scrollbars=auto,status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,location=1'); }

function setCookie_1(name,value,secTimeout)
{
	var domain = document.domain;
	domain = domain.replace("www.",".");
	
	if (secTimeout == -1)
	secTimeout = 60*60*24*365;
		
	var exdate=new Date();
	exdate.setTime(exdate.getTime()+(secTimeout*20000));
	
	var cookie = name + "=" + escape(value) + ";expires="+exdate.toGMTString() + ";path=/";
	if (domain != "")
		cookie += ";domain=" + domain;
							
	document.cookie = cookie;
}
	
function getCookie_1(name)
{
	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));
    	 }
  	}
  	return "";
}
 
function popup_1(url, isOnClick) 
{
	var is_popup_activated = getCookie_1('5');
	if (is_popup_activated == "")
	{				
		if (isOnClick)
			setCookie_1('5','yes',20);
		
		TheNewWin=f_open_window_max(url,'win_1');

		if (TheNewWin)
		{
			if (!isOnClick)
				setCookie_1('5','yes',50);
			//TheNewWin.blur();
		}
	}
}
	
function addListener_1(element, event, listener)
{
	if (element)
	{
		if(element.addEventListener)
 		{
			element.addEventListener(event, listener, false);
			return 0;
 		}
		else if (this.attachEvent)
		{
			element.attachEvent("on" + event, listener);
			return 0;
		}
	}			
	return -1;
}
	
function load_1()
{	
	addListener_1(document.body,"click", function() { popup_1('http://aff.clickon.co.il/z/20448/CD3368',true); });
}
		
addListener_1(this,"load",function() { load_1(); });

