function popUpXHtml(text,title,width,height,styles){
    if(!styles){styles='';}
    
     var left   = (screen.width  - width)/2;
     var top    = (screen.height - height)/2;
    
    var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
        html +='<html xmlns="http://www.w3.org/1999/xhtml">';
        html +='<head>';
        html +='<title>'+title+'</title>';
        html +='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
        html +=styles;
        html +='</head><body>';
        html +='<div class="sigma-widget-preview-box">';
        html +=text;
        html +='</div>';
        html +='</body></html>';
    var randomnumber=Math.floor(Math.random()*1001);
    var frog = window.open("","name"+randomnumber,"width="+width+",height="+height+",top="+top+",left="+left+"scrollbars=0,resizable=1,location=0,menubar=0,toolbar=0");
    //variable name of window must be included for all three of the following methods so that
    //javascript knows not to write the string to this window, but instead to the new window
    frog.document.open();
    frog.document.write(html);
    frog.document.close();
    return frog;
}

