/*
function openWin(url,title,attrib) 
{
var wref=window.open(url,title,attrib);
}
function openInnewWindow(url,width,height,toolbar) 
{
  if(toolbar==1) 
  {
   openWin(url,'_blank','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height)
  } 
  else 
  {
   openWin(url,'_blank','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,movable=yes,resizable=yes,width='+width+',height='+height)
  }
}
*/


function closeMe(){
  if(window.opener.parent.location.href.indexOf("online/HP_0.html")==-1)
	{
	  try{
		 parent.window.opener.parent.location.href="http://www.nrg.co.il/online/HP_0.html";
		}
		 catch(e){
		 try{
		    parent.window.opener.location.href="http://www.nrg.co.il/online/HP_0.html";
		 }
		 catch(e){}
		}
	} 
	try{
			window.open(window.close(),'_self','');
	}
	catch(e){}
}
/*
var refreshFlag = true; 
var sURL = unescape(window.location.pathname);
function doLoad()
{    
    if(refreshFlag)
    {      
    			 setTimeout( "refresh()", 20*60*1000 );    
    }
}

function refresh(){   
if(refreshFlag){    
window.location.replace( sURL );    
}
}
window.onload= doLoad;

function SetCookie(name, value, days) {
var expire = new Date ();
		expire.setTime (expire.getTime() + (24 * 60 * 60 * 1000) * days);
		document.cookie = name + "=" + escape(value) + "; expires=" + expire.toGMTString();
}*/
function getCookie(Name){
var search=Name + "=";
    if(document.cookie.length > 0)
    { 
    				var offset = document.cookie.indexOf(search); 
            if (offset != -1) 
            { 
                offset += search.length; 
                var end = document.cookie.indexOf(";", offset); 
                if (end == -1) 
                end = document.cookie.length; 
                return (unescape(document.cookie.substring(offset, end))); 
            }
    }
}

function openWin1(url,title,attrib) {    
	 var wref=window.open(url,title,attrib);
}
function openInnewWindow1(url,width,height,toolbar) {    
  if(toolbar==1)     
  {        
  		openWin1(url,'_blank','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height)    
  }     
  else     
  {        
  		openWin1(url,'_blank','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,movable=yes,resizable=yes,width='+width+',height='+height)    
  }
}

function addArt(aID,aHref,aChn,pFrom){ 
var cVal = getCookie("maariv_nrg");  
var vChn = aChn;  
while(vChn.indexOf('&')>-1)
vChn=vChn.replace('&','*');  
if (cVal == null || cVal == "") 
{  
document.getElementById("launcher").innerHTML="<iframe id=imgcut height=0 src=/members/owa/MEMBER_ACOUNT.SAVE_LAST_ACTION?pArtRaz="+aID+"&pArtLink="+aHref+"&pChannelName="+vChn+"&pFrom="+window.location.href+"></iframe>"; 
window.setTimeout('location.href = "/members/owa/MEMBER_LOGIN.showLoginForm"',2000); 
} 
else{    
document.getElementById("launcher").innerHTML="<iframe id=imgcut height=0 width=100 height=100 border=2 src=/members/owa/MEMBER_ACOUNT.addArtToMyFolder?pArtRaz="+aID+"&pArtLink="+aHref+"&pChannelName="+vChn+"&pFrom=></iframe>";  
var vURL = "/gevanew/owa/ADD_ART_TO_FOLDER?pArtRaz="+aID;  
openInnewWindow1(vURL, 600, 200, 0);  
document.getElementById("launcher").innerHTML=""; } 
}
/*
var vabrod="N";
function coo(){ 
vabrod=getCookie("locusr");  
if(vabrod!="Y" && vabrod!="N") 
{	  
document.write("<SCRIPT LANGUAGE=\"JavaScript\" src=\"" + "/location/locusr.php\">");  
document.write("<\/SCRIPT>");    
} 
}
coo();

function showMsg(msg,img){ 
if(document.getElementById(msg).style.display == "none"){	
document.getElementById(msg).style.display = "";    
if(document.getElementById(img)!= null) 
{     
    if(document.getElementById(img).src != "/images/nrg/gifs/t.gif")    	
      document.getElementById(img).src = "/images/nrg/gifs/comments/minus.gif";    
    } 
} 
else{	
    document.getElementById(msg).style.display = "none";    
    if(document.getElementById(img)!= null) 
    {      
    		if(document.getElementById(img).src != "/images/nrg/gifs/t.gif")       
    			 	document.getElementById(img).src = "/images/nrg/gifs/comments/plus.gif";    
    } 
}
}
*/
