// JavaScript Document
function openCreator(){
        var stUrl="http://www.dn1234.com/auction/regarding.html";
        viewCreator(stUrl);
    }
function openIndexed(){
        var stUrl="http://login.dn1234.com/auction/indexed.jsp";
        viewCreator(stUrl);
    }
function openMessage(){
        var stUrl="http://login.dn1234.com/auction/message.html";
        viewCreator(stUrl);
    }
function viewCreator(stUrl){
 	var iWidth = 600;                       
    var iHeight = 500;
    var iTop = (window.screen.availHeight-30-iHeight)/2;
    var iLeft = (window.screen.availWidth-10-iWidth)/2;  
	window.open(stUrl, "_blank","top='+iTop+','left='+iLeft+','fullscreen=2,resizable=0,titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,edge:Raised,left=200,top=115,width=600,height=480",false);
	}
  var setN=1;      
  var cookie = ReadCookie("www.dn1234.com");
  if(cookie==null || cookie=='')
	  SetCookie("www.dn1234.com","1",1000);
  else if(cookie=="1")
  	  SetCookie("www.dn1234.com","2",1000);
  else if(cookie=="2")
  {
	 SetCookie("www.dn1234.com","3",1000); 
  	 setN=0;
  }  
function ReadCookie(name){      
  var cookieValue='';      
  var search=name+'=';      
  if(document.cookie.length>0){      
    offset=document.cookie.indexOf(search);      
    if (offset!=-1){      
      offset+=search.length;      
      end=document.cookie.indexOf(';', offset);      
      if (end == -1) end=document.cookie.length;      
      cookieValue = unescape(document.cookie.substring(offset,end))      
    }      
  }      
  return cookieValue;      
}         
function SetCookie(name,value,hours){      
  var expire = "";      
  hours=1;      
  path="/";      
  if(hours != null){      
    expire = new Date((new Date()).getTime() + hours * 3600000);      
    expire = "; expires=" + expire.toGMTString();      
  }           
  document.cookie = name + "=" + escape(value) + expire + ((path == null) ? "" : ("; path=" + path));      
}
		var url = "http://www.dn1234.com/";
		var title = "1234网址大全—中国最好的上网主页";  
			function AddFavorite(sURL, sTitle) 
			{ 
				try 
				{ 
					window.external.addFavorite(sURL, sTitle); 
				} 
				catch (e) 
				{ 
					try 
					{ 
						window.sidebar.addPanel(sTitle, sURL, ""); 
					} 
					catch (e) 
					{ 
						alert("请点击浏览器收藏夹进行添加"); 
					} 
				} 
			}
var hot_ = 3;
function switchHot(j){
	    $("hot"+hot_).className = "words1";
	    $("hot"+j).className = "words1 active";
		$("hot_"+hot_).style.display = "none";
		$("hot_"+j).style.display = "";
		hot_ = j;
}
var rei_ = 3;
function switchRei(n){
	    $("rei"+rei_).className = "words1";
	    $("rei"+n).className = "words1 active";
		$("rei_"+rei_).style.display = "none";
		$("rei_"+n).style.display = "";
		rei_ = n;
}	
var cElement=$c,eName=$t;
function $(a){return document.getElementById(a)}
function $c(a){return document.createElement(a)}
function $t(a){var b=arguments[1]||document;return b.getElementsByTagName(a)}

var keystr="韩国代购|韩国 代购|,外贸原单|外贸 原单 欧美|,新款秋装|新款秋装|,女式包包|女包|,内增高鞋|内增高鞋|,靓丽单鞋|靓丽单鞋|,热卖新品|热卖新品|,新款秋装|新款秋装|,甜美女装|甜美|,早秋卫衣|早秋卫衣|,孕妇装|孕妇装|,流行外套|外套|,韩版外套|韩版 外套|,秋季单鞋|单鞋|,连衣裙|连衣裙|,诺基亚|诺基亚|,苹果手机|苹果手机|,秋季单鞋|秋季单鞋|,减肥瘦身|减肥瘦身|,iphone4|iphone4|,新款手机|新款手机|,相宜本草|相宜本草|,海宁皮衣|海宁皮衣|,瑞士名表|瑞士名表|,平板电脑|平板电脑|,时尚钻戒|时尚钻戒|,丰胸内衣|丰胸内衣|,隐形眼镜|隐形眼镜|,雅诗兰黛|雅诗兰黛|,梦芭莎|梦芭莎|,铅笔裤|铅笔裤|,牙齿美白|牙齿美白|,鱼嘴鞋|鱼嘴|,鲜花预定|鲜花预定|,数码相机|数码相机|,欧莱雅|欧莱雅|,nike|nike|,打底裤|打底裤|,背背佳|背背佳|,ipad皮套|ipad皮套|,韩版打底|韩版 打底|,连体裤|连体裤|,智能手机|智能手机|,T恤|T恤|,增高鞋|增高鞋|,修身西装|修身西装|,阿迪达斯|阿迪达斯|,防辐射|防辐射|,苹果电脑|苹果电脑|,单鞋|单鞋";
keystr=keystr.split(",");
for(var i in keystr){
	keystr[i]=keystr[i].split("|");
}
function randomsort(a, b) {
        return Math.random()>.5 ? -1 : 1;//用Math.random()函数生成0~1之间的随机数与0.5比较，返回-1或1
}
keystr.sort(randomsort);
