/**
专题弹窗js
author：jingking
**/


function SetCookieEjia(name,value)//两个参数，一个是cookie的名子，一个是值
{
    var Hours = 1; //此 cookie 将被保存 小时数
    var exp  = new Date();   
    exp.setTime(exp.getTime() + Hours*60*60*1000);
    value = escape(value);
    value = value.replace(/\+/g,"%2b");
    document.cookie = name + "="+value+ ";path=/;expires=" + exp.toGMTString();
}
function getCookieEjia(name)//取cookies函数        
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;

}
function delCookieEjia(name)//删除cookie
{
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookieEjia(name);
    if(cval != null) document.cookie= name + "=null;expires="+exp.toGMTString();
}
var isopen = getCookieEjia('OpenWindow')
//alert(isopen);
if(isopen != 'OpenWindow')
{
SetCookieEjia('OpenWindow','OpenWindow');
window.open( 'http://www.ejia.com/?topic'); 
}