function Get_Cookie(name) {

   var start = document.cookie.indexOf(name+"=");

   var len = start+name.length+1;

   if ((!start) && (name != document.cookie.substring(0,name.length))) return null;

   if (start == -1) return null;

   var end = document.cookie.indexOf(";",len);

   if (end == -1) end = document.cookie.length;

   return unescape(document.cookie.substring(len,end));

}



function Set_Cookie(name,value,expires,path,domain,secure) {

    var cookieString = name + "=" +escape(value) +

       ( (expires) ? ";expires=" + expires.toGMTString() : "") +

       ( (path) ? ";path=" + path : "") +

       ( (domain) ? ";domain=" + domain : "") +

       ( (secure) ? ";secure" : "");

    document.cookie = cookieString;

}



function launch_support()

{


                var request_url = "http://cloud.aloweb.com.br/website/?cl=6220800&dp=0";

                newwin = window.open( request_url , 'alo6220800' , 'scrollbars=no ,width=522, height=533 , top=50 , left=50') ;

                newwin.focus() ;

                DoClose() ;

}







function checkinitiate()

{

                if (!Get_Cookie('show')) {



                               if (confirm('Você está recebendo um convite para atendimento on-line dos empreendimentos da Cia Goiânia-GO. Você aceita?')) {

                                               chat_opened = 1 ;

                                               launch_support() ;

                               } else {

                               }

                }



                Set_Cookie( "show" , "0" , 0 , "/" , false );

}
