//收藏
function fav(what) {
    var url = window.location.href;
    try {window.external.addFavorite(url,what.title);}
    catch(e) {
        try {window.sidebar.addPanel(what.title, url, "");}catch(e) {alert("加入收藏失败，请使用Ctrl+D进行添加");}
    }
}

function copy_code(copyText) 
{
    if (window.clipboardData) 
    {
       window.clipboardData.setData("Text", copyText)
    } 
    alert('该网页地址已复制，您可以在QQ、MSN中粘贴（快捷键CTRL+V）推荐给好友');
}

function sendmail()
{
    url="mailto:hr@mysoft.com.cn?subject=%e7%94%a8%e6%88%b7%e5%8f%91%e9%80%81%e6%98%8e%e6%ba%90HR";
	location.href=url;
}

function initLayout()
{
  if($(".Sidebar").length>0&&($(".Sidebar").height()<$(".Maincontent").height())){
    $(".Sidebar").height($(".Maincontent").height());
  }
}

jQuery(document).ready(function(){
  //职位搜索
  obj = document.getElementById("btnWorkSearch"); 
  if (obj){ 
    jQuery("#btnWorkSearch").click(function(){
      key=jQuery("#WorkKey").val();
	  if(key=="请输入职位关键词")
	    key="";
	  aid=jQuery("#WorkPlace").val();
	  location.href="job_search.aspx?aid="+aid+"&key="+key+"&t="+Math.random(); 
    });
  }
    
  if(typeof(main)!="undefined"){
      jQuery("#main"+main).addClass("aCur");
	  jQuery("#main"+main).children("ul").show();
  }
    
  initLayout();
	
  $(window).resize(function(){   
    initLayout();   
  }); 
  
  $("img").lazyload({ effect:"show"}); 
});
