	function download(num) {
	 			 	 
    var rid = ReadCookie("rid");
    var sub = ReadCookie("sub");
	 			 	 			 
    if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent))
    {
         if (num == "" || num == null)
         {
            mywindow = window.open('http://www.etoro.com/setup.aspx?lang=8&rid=' + rid +'&sub='+ sub +'','downWindow','left=0,top=0,width=100,height=100,z-lock=yes,dependent=yes');	
            num=0;
         }
         else
         {
            mywindow = window.open('http://www.etoro.com/setup.aspx?lang=8&rid=' + rid +'&sub='+ sub +'&dl='+num+'','downWindow','left=0,top=0,width=100,height=100,z-lock=yes,dependent=yes');	
         }
	} 
	 
  location.href= "/download.aspx?lang=8&rid=" + rid + "&sub=" + sub + "&dl=" + num;
}

    function ReadCookie(cookieName) {
        var theCookie=""+document.cookie;
        var ind=theCookie.indexOf(cookieName);
        if (ind==-1 || cookieName=="") return ""; 
        var ind1=theCookie.indexOf(';',ind);
        if (ind1==-1) ind1=theCookie.length; 
        return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
   }
	 
