﻿// JavaScript Document
var CONFIG_session_gc_maxlifetime=1200000;//1200000

isemail=function(string)   
{   
      var   addressPattern   =     
          /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;   
      return   addressPattern.test(string);   
};
copy=function(obj)   
{   
      obj.select();
	  window.clipboardData.setData('text',obj.value);
	  alert("the content has been copied");
};
 
ajax_error=function(request)
   {
       //alert("网络状况欠佳，通信受阻。");
	   //alert(request.responseText);
	   eval(request.responseText);
   };
   
/*   
$.fn.serialize = function(){
    var s = [];
    $('input[@name], select[@name], textarea[@name]', this).each(function (){
        if(this.disabled || (this.type == 'checkbox' || this.type == 'radio') && !this.checked)
            return;
        if (this.type == 'select-multiple'){
            var name = this.name;
            $('option:selected', this).each(function(){
                s.push(name + '=' + encodeURIComponent(this.value));
            });
        }
        else
            s.push(this.name + '=' + encodeURIComponent(this.value));
    });
    return s.join('&');
};

var f=function()
{
	$.ajax({
	url: "/test.php",
	data: $("#form1").serialize(),
	dataType: "script",
	//success: function(msg){alert(msg);},
	type: "POST",
	error:ajax_error
	});
};
$("#text1").attr("value")
$("#text1").attr("value",1)
PHP:header("content-Type: text/javascript; charset=utf-8");
*/