var wcjs_popup_interval=0;
var top_page_link=''
var url_ie6='';
function popup_div1(contenido,w,h)
{
    //var hWin = (Window.getScrollHeight() > Window.getHeight()) ? Window.getScrollHeight() : Window.getHeight();
    var hWin=jQuery(Window).height();
    var top=(hWin-h)/2;
    top=parseInt(top);
    //if(jQuery('#wcjs_popup').is (':visible'))
    //{
    //   jQuery('#wcjs_popup').hide();
    //   clearTimeout(wcjs_popup_interval);
    //}

    if(jQuery('#wcjs_popup1').length > 0)
    {
        if(jQuery.browser.msie && jQuery.browser.version <= 6)
        {
          jQuery('#wcjs_popup1').show();
          jQuery('#wcjs_popup1').html('<div id="wcjs_popup_content2" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:0px;z-index:5001;position:relative;top:0;left:50%;border:0;padding:5px;text-align:center;background:transparent;"><a name="popup_div"></a></div>'+'<div id="wcjs_popup_content1" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:'+h+'px;z-index:6001;position:relative;top:0;left:50%;border: #1D6CBB 2px solid;padding:5px;text-align:center;background:#ffffff;">&nbsp;</div>');
          location.href=url_ie6;
        }
        else
        {
          jQuery('#wcjs_popup1').html('<div id="wcjs_popup_content1" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:'+h+'px;z-index:6001;position:fixed;top:'+top+'px;left:50%;border: #1D6CBB 2px solid;padding:5px;text-align:center;background:#ffffff;">&nbsp;</div>');
        }
    }
    else
    {
        if(jQuery.browser.msie && jQuery.browser.version <= 6)
        {
          jQuery('body').append('<div id="wcjs_popup1" style="position:absolute;top: 230px; left: 0px;z-index:6000;border:0;width:100%;height:100%;">'+
             '<div id="wcjs_popup_content2" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:0px;z-index:5001;position:relative;top:0;left:50%;border:0;padding:5px;text-align:center;background:transparent;"><a name="popup_div"></a></div>'+
             '<div id="wcjs_popup_content1" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:'+h+'px;z-index:6001;position:relative;top:0;left:50%;border: #1D6CBB 2px solid;padding:5px;text-align:center;background:#ffffff;">&nbsp;</div>'+
          '</div>');
          tmp=location.href;
          tmp2=tmp.split('#')
          url_ie6=tmp2[0]+'#popup_div'
          location.href=url_ie6;
        }
        else
        {
          jQuery('body').append('<div id="wcjs_popup1" style="position:fixed; top: 0px; left: 0px;z-index:6000;border:0;width:100%;height:100%;display:none;">'+
             '<div id="wcjs_popup_content1" style="margin: 0px -'+(w/2)+'px;width:'+w+'px;height:'+h+'px;z-index:6001;position:fixed;top:'+top+'px;left:50%;border: #1D6CBB 2px solid;padding:5px;text-align:center;background:#ffffff;">&nbsp;</div>'+
          '</div>');
        }
    }

    contenido_tmp = contenido;
    contenido ='<div style="float:none;width:'+w+'px;height:30px" ><div style="float:right;width:50px;margin-right: 20px;" ><a href="#null" title="Close" onclick="popup_div1_hide();">Close</a></div></div>'+contenido_tmp;
    jQuery('#wcjs_popup_content1').html(contenido);
    jQuery('#wcjs_popup1,#wcjs_popup_content1').fadeIn('slow');

    jQuery("#wcjs_popup1").bind('click',function(){ popup_div1_hide(); });
    //wcjs_popup_interval = setTimeout("wcjs_hide_popup()",4000);
}
function popup_div1_hide()
{
   jQuery('#wcjs_popup1,#wcjs_popup_content1').fadeOut('slow');
   jQuery("#wcjs_popup1").unbind('click');
   //clearTimeout(wcjs_popup_interval);
}