
	$("a#hit").mouseover(function(){
		$("div#hitshow").show("fast");
	}).mouseout(function(){$("div#hitshow").hide("fast")});

$(document).ready(function(){
/*首頁文章*/
	$("div#more").click(function(event){
		event.preventDefault();
		$("div#open").show("slow");
		$("div#more").hide("slow");
		$("div#close").show("slow");
	});
	$("div#close").click(function(event){
		event.preventDefault();
		$("div#open").hide("slow");
		$("div#more").show("slow");
		$("div#close").hide("slow");
	});

/*登入後台*/
	$("a#login").click(function(){
		$("div#log_in").show("fast");
	});

/*產品說明*/
	$("li#pp1").mouseover(function(){
		$("div#p1").show("fast");
	}).mouseout(function(){$("div#p1").hide("fast")});
	$("li#pp2").mouseover(function(){
		$("div#p2").show("fast");
	}).mouseout(function(){$("div#p2").hide("fast")});
	$("li#pp3").mouseover(function(){
		$("div#p3").show("fast");
	}).mouseout(function(){$("div#p3").hide("fast")});
	$("li#pp4").mouseover(function(){
		$("div#p4").show("fast");
	}).mouseout(function(){$("div#p4").hide("fast")});
	$("li#pp5").mouseover(function(){
		$("div#p5").show("fast");
	}).mouseout(function(){$("div#p5").hide("fast")});
	
	/*顯示新視窗圖示*/	
	$("a#active").hover(
	  function () {
		$(this).append($("<span>&nbsp;<img src='images/_blank.gif'></span>"));
	  }, 
	  function () {
		$(this).find("span:last").remove();
	  }
	);
	

});
/*驗証交換連結*/
$(document).ready(function(){
	$('#usernameLoading').hide();
	$('#website').blur(function(){
		$('#usernameLoading').show();
		$.post("check_link.php",{
			   website:$("#website").val()
			   },
		function(response){
        	$('#usernameResult').fadeOut();
        	setTimeout("finishAjax('usernameResult', '"+escape(response)+"')", 400);
		});
    	return false;
	});
	
});
function finishAjax(id, response) {
  $('#usernameLoading').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
} //finishAjax
/*驗証交換連結*/

function opennews(k){  	
	$(function() {
		$('#opennews'+k).dialog("destroy");
	
		$('#viewnews'+k).dialog({
			resizable: false,
			height:580,
			width:750,
			modal: true,
			buttons: {
				'Close': function() {
					$(this).dialog('close');
				}
			}
		});
	});
}

/*廣告輪播*/
	$(function(){
		roll_show(); //宣告 jquery 要使用roll_show();函數
	});
function roll_show()
{
	//$("#banner1").html();
	$.post("banner_ch.php", { action : 'show' },  
		function(txt) {$('#banner').html(txt);});	
	setTimeout("roll_show();",4000);
}

	$(function(){
		roll_show1(); //宣告 jquery 要使用roll_show();函數
	});
function roll_show1()
{
	//$("#banner1").html();
	$.post("banner400_1.php", { action : 'show' },  
		function(txt) {$('#banner1').html(txt);});	
	setTimeout("roll_show1();",3000);
}

	$(function(){
		roll_show2(); //宣告 jquery 要使用roll_show();函數
	});
function roll_show2()
{
	//$("#banner1").html();
	$.post("banner400_2.php", { action : 'show' },  
		function(txt) {$('#banner2').html(txt);});	
	setTimeout("roll_show2();",3000);
}
/*廣告輪播*/

function checkform()
{
if(document.getElementById('website').value == ""){
alert('請填寫連結網址');window.document.getElementById('website').focus();return false}
else if(document.getElementById('webname').value == ""){
alert('請填寫網站名稱');window.document.getElementById('webname').focus();return false}
else if(document.getElementById('webdescription').value == ""){
alert('請填寫網站描述');window.document.getElementById('webdescription').focus();return false}
if(document.getElementById('webkeyword').value == ""){
alert('請填寫網站關鍵字');window.document.getElementById('webkeyword').focus();return false}
return confirm('確定送出?');
}

function check_cooperation()
{
if(document.getElementById('co_company').value == ""){
alert('請填寫公司名稱');window.document.getElementById('co_company').focus();return false}
else if(document.getElementById('co_user').value == ""){
alert('請填寫聯絡人');window.document.getElementById('co_user').focus();return false}
else if(document.getElementById('co_tel').value == ""){
alert('請填寫聯絡電話');window.document.getElementById('co_tel').focus();return false}
else if(document.getElementById('co_mail').value == ""){
alert('請填寫聯絡信箱');window.document.getElementById('co_mail').focus();return false}
else if(document.getElementById('co_content').value == ""){
alert('請填寫簡略說明');window.document.getElementById('co_content').focus();return false}
return confirm('確定送出?');
}

function reload(){
window.location.reload();	
}

