//測試

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function jumpMenu(selObj,restore){
	if (selObj.options[selObj.selectedIndex].value!='')
	{
		MM_openBrWindow(selObj.options[selObj.selectedIndex].value,'_partner','top=0, left=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=400');
		//document.lcoation.href=selObj.options[selObj.selectedIndex].value;
		if (restore) selObj.selectedIndex=0;
	}
}

function jumpMenu2(selObj,restore){
	if (selObj.options[selObj.selectedIndex].value!='')
	{
		document.location.href=selObj.options[selObj.selectedIndex].value;
	}
}

function chkFrmLogin(of)
{
	var check_result = true;
	var err_msg = "";
	var i = 0, radiok=0;

	//
	if ( !IsEmail(of.acc.value) )
	{
			if (check_result)
				of.acc.focus();
			check_result = false;
			err_msg = err_msg + " - 請填寫正確email\n";
	}

	//
	if (of.pwd.value=='')
	{
		if (check_result)
			of.pwd.focus();
		check_result = false;
		err_msg = err_msg + " - 請填寫密碼\n";
	}
	//show the result ---------------------------------
	if (!check_result)
	{
		err_msg = "很抱歉，請確認以下資料，謝謝！\n\n" + err_msg;
		alert(err_msg);
	}

	return check_result;
}

function pushFacebook()
{
	var u=document.location.href;
	var t=document.title;
	var next_url = 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);
	//document.location.href = next_url;
	MM_openBrWindow(next_url,'_partner','top=0, left=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}

function pushTwitter()
{
	var u=document.location.href;
	var t=document.title;
	var next_url = 'http://twitter.com/share?url='+encodeURIComponent(u);
	//document.location.href = next_url;
	MM_openBrWindow(next_url,'_partner','top=0, left=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}

function pushPlurk()
{
	var u=document.location.href;
	var t=document.title;
	var next_url = 'http://www.plurk.com/m?content='+encodeURIComponent(u)+'&qualifier=shares+';
	//document.location.href = next_url;
	MM_openBrWindow(next_url,'_partner','top=0, left=0,toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}


function pushFunP()
{
	var u=document.location.href;
	var t=document.title;
	//document.location.href = 'http://funp.com/push/submit/?url='+encodeURIComponent(u)+'&qualifier=shares+';
	document.location.href = 'http://www.pixnet.net/';
}



