var txtVersion = "0.1";

var addtoInterval = null;

var popupWin = '';



var ThisPageUrl    =self.location.href;

var ThisPageTiTle  =self.document.title;





function addtoWin(addtoFullURL)

{

	if (!popupWin.closed && popupWin.location){

		popupWin.location.href = addtoFullURL;

		var addtoInterval = setInterval("closeAddTo();",1000);

	}

	else{

		popupWin = window.open(addtoFullURL,'addtoPopUp','width=770px,height=500px,menubar=1,toolbar=1,status=1,location=1,resizable=1,scrollbars=1,left=0,top=100');

		var addtoInterval = setInterval("closeAddTo();",1000);

		if (!popupWin.opener) popupWin.opener = self;

	}

	if (window.focus) {popupWin.focus()}

	return false;

}

// closes the popupWin

function closeAddTo() {

	if (!popupWin.closed && popupWin.location){

		if (popupWin.location.href == AddURL)	//if it's the same url as what was bookmarked, close the win

		popupWin.close();

	}

	else {	//if it's closed - clear the timer

		clearInterval(addtoInterval)

		return true

	}

}



function addto(addsite){



	var addtoMethod =1;



	switch(addsite){

		case '1':	//	Del.icio.us	ID:2 &v=3&noui=yes&jump=close

			var AddSite = "http://del.icio.us/post?";

			var AddUrlVar = "url";

			var AddTitleVar = "title";

			var AddNoteVar = "";

			var AddReturnVar = "";

			var AddOtherVars = "";		

			break

		case '2':	//	Digg ID:2

			var AddSite = "http://digg.com/submit?";

			var AddUrlVar = "url";

			var AddTitleVar =  "";

			var AddNoteVar =  "";

			var AddReturnVar =  "";

			var AddOtherVars = "&phase=2";

			break



		case '3':	//	Furl ID:3

			var AddSite = "http://www.furl.net/storeIt.jsp?";

			var AddUrlVar = "u";

			var AddTitleVar = "t";

			var AddNoteVar = "";

			var AddReturnVar = "";

			var AddOtherVars = "";	

			break

		case '4':	//	Yahoo ID: 4

			var AddSite = "http://myweb2.search.yahoo.com/myresults/bookmarklet?";

			var AddUrlVar = "u";

			var AddTitleVar = "t";

			var AddNoteVar = "";

			var AddReturnVar = "";

			var AddOtherVars = "&d=&ei=UTF-8";

			break

		case '5':	//	EC21 Site: 5

			var AddSite = "http://www.bossgoo.com/sell_search.php?";

			    //addtoMethod =0;

			var AddUrlVar = "act";

			var AddTitleVar = "keyword";

  			var AddTypeVar = "type=HP";

			var AddNoteVar = "";

			var AddReturnVar = "";

			var AddOtherVars = "";

			break	

			

		default:

	}

	

	// Ӽ  

	  AddURL    = ThisPageUrl;

    AddTitle  = ThisPageTiTle;



	var addtoFullURL = AddSite + AddUrlVar + "=" + AddURL ;

 

	if (AddTitleVar != "") 

		{var addtoFullURL = addtoFullURL + "&" + AddTitleVar + "=" + AddTitle;}

		

	if (AddOtherVars != "") 

		{var addtoFullURL = addtoFullURL + "&" + AddOtherVars;}

	

	if (AddNoteVar != "") 

		{var addtoFullURL = addtoFullURL + "&" + AddNoteVar + "=" + AddTitle;}



	if (AddTypeVar != "") 

		{var addtoFullURL = addtoFullURL + "&" + AddTypeVar;}



		 

	if (AddReturnVar != "")

		{var addtoFullURL = addtoFullURL + "&" + AddReturnVar + "=" + AddURL;}

//	Checking AddToMethod, to see if it opens in new window or not

			 



	switch(addtoMethod){

		case 0:	// 0=direct link

			self.location = addtoFullURL

			break

		case 1:	// 1=popup

			addtoWin(addtoFullURL);

			break

		default:	

		}

	 	return false;

}









  addthis_url    = 'http://blog.addthis.com/?p=31';

  addthis_title  = 'Cool New Version of the Widget';

  addthis_pub    = '';

  

  var at12O='http://s7.addthis.com/';

// addthis_url=encodeURIComponent(addthis_url);

// addthis_title=encodeURIComponent(addthis_title);

// addthis_title=addthis_title.replace('\'','\\\'');

 

 



function at12y(at12R){

   return 'http://www.addthis.com/bookmark.php?v=12&pub='+addthis_pub+'&s='+at12R+'&url='+addthis_url+'&title='+addthis_title;

 }



function addthis_clearclosewin()

{

  if (typeof at12A!="undefined")clearTimeout(at12A);

}



function at12I(at12i)

{

  return document.getElementById(at12i);

}

 

function addthis_onmouseover(at12a,at12E ){

 

 addthis_clearclosewin( );





 at12Z= weburl+'/images/';

 at12z=at12I('addthis_favorites'); 

 at12z.src=at12Z+'myfavor.gif'; 

 at12z=at12I('addthis_ec21'); 

 at12z.src=at12Z+'mybossgoo.gif'; 

 at12z=at12I('addthis_delicious'); 

 at12z.src=at12Z+'delicio.gif'; 

 at12z=at12I('addthis_digg');

 at12z.src=at12Z+'digg.gif';  

 at12z=at12I('addthis_furl');

 at12z.src=at12Z+'furl.gif';  

 at12z=at12I('addthis_myweb');

 at12z.src=at12Z+'yahoo.gif'; 

 



 var at12X=at12a.getElementsByTagName('img');     

 if (at12X)at12a=at12X[0];

 

 var at12x=at12I('addthis_dropdown'); 

 at12x.style.display='block';   

 var at12W=at12w(at12a);   

 at12V=at12W[0]+1; 

 at12v=at12W[1];      

 

 var at12T=at12t( );

 var at12S=at12s( );

 

 if (at12V-at12S[0]+at12x.clientWidth+024>at12T[0])   at12V=at12V-0157;

 if (at12v-at12S[1]+at12x.clientHeight+at12a.clientHeight+024>at12T[1])  at12v=at12v-0235;

 at12x.style.left=at12V+'px';



 at12x.style.top=(at12v+at12a.clientHeight)+'px';

 

 

 return false;

 }

 

 

 

 function at12w(at12r){

 

  var at12Q=0,at12q=0;  

    do { 

        at12Q+=at12r.offsetTop || 0;

        at12q+=at12r.offsetLeft || 0;

       at12r=at12r.offsetParent;

    }while (at12r);

 

    return [at12q,at12Q];

 }

 

 function at12t( ){



 	var at12P=0;

 	var at12p=0;

 	if (typeof(window.innerWidth)=='number'){

 		at12P=window.innerWidth;

 		at12p=window.innerHeight;

  }else if (

     document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){at12P=document.documentElement.clientWidth;

     at12p=document.documentElement.clientHeight;

  }else if (document.body && (document.body.clientWidth || document.body.clientHeight)){at12P=document.body.clientWidth;

    at12p=document.body.clientHeight;

  }

  return [at12P,at12p];

 }

 

function at12s( ){

 var at12N=0;

 var at12n=0;

 if (typeof(window.pageYOffset)=='number'){at12n=window.pageYOffset;

   at12N=window.pageXOffset;

 }else if (document.body && (document.body.scrollLeft || document.body.scrollTop)){at12n=document.body.scrollTop;

   at12N=document.body.scrollLeft;

 }else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){at12n=document.documentElement.scrollTop;

   at12N=document.documentElement.scrollLeft;

 }

 return [at12N,at12n];

}



 

 

function addthis_onmouseout()

{

 addthis_closewinwait( );

}

 

 

function addthis_closewinwait()

{

 at12A=setTimeout("addthis_closewin()",0764);

}





function addthis_closewin()

{

  var at12x=at12I('addthis_dropdown');

      at12x.style.display='none';

 return false;

 }



function at12M( ){

 at12m=document.createElement('link');

 at12m.rel='stylesheet';

 at12m.type='text/css';

 at12m.href='http://www.netcec.com/images/addthis_web.css';

 at12m.media='all';

 document.lastChild.firstChild.appendChild(at12m);

 }





function at12L( ){

 at12M();

 var at12l='<div id="addthis_dropdown" onmouseover="addthis_clearclosewin()" onmouseout="addthis_onmouseout()" style="z-index: 1000; position: absolute; display: none">';

 at12l+='<table width="100%" cellpadding="2" cellspacing="0" style="background-color: #EEEEEE; height: 20px">';

 at12l+='<tr><td style="font-size: 12px; color: #666666">使用书签</td></tr>';

 at12l+='</table>';

 at12l+='<table id="addthis_services"  width="100%" cellpadding="0" style="font-family: Verdana, Arial; font-size: 11px;">';

 at12l+='<tr>';

 at12l+='<td width=\"50%\"><a href=\"/\" onclick=\"return ThisPageMarks();\"><img id=\"addthis_favorites\" alt=\"\" width=\"16\" height=\"16\" />&nbsp; 收藏夹</a></td>';

 at12l+='<td width=\"50%\"><a href=\"/\" onclick=\"return addto(\'5\')\"><img id=\"addthis_ec21\" alt=\"\" width=\"16\" height=\"16\"  />&nbsp; My Bossgoo</a></td>';

 at12l+='</tr><tr>';

 at12l+='<td width=\"50%\"><a href=\"/\" onclick=\"return addto(\'1\')\"><img id=\"addthis_delicious\" alt=\"\" width=\"16\" height=\"16\" />&nbsp; Del.icio.us</a></td>';

 at12l+='<td width=\"50%\"><a href=\"/\" onclick=\"return addto(\'2\');\"><img id=\"addthis_digg\" alt=\"\" width=\"16\" height=\"16\"  />&nbsp; Digg</a></td>';

 at12l+='</tr><tr>';

 at12l+='<td><a href=\"/\" onclick=\"return addto(\'4\');\"><img id=\"addthis_myweb\" alt=\"\" width=\"16\" height=\"16\"  />&nbsp; Yahoo MyWeb</a></td>';

 at12l+='<td><a href=\"/\" onclick=\"return addto(\'3\');\"><img id=\"addthis_furl\" alt=\"\" width=\"16\" height=\"16\"  />&nbsp; Furl</a></td>';

 at12l+='</tr>';

 at12l+='</table>';

 at12l+='<table width="100%" cellpadding="0" cellspacing="0" style="background-color: #EEEEEE; height: 6px; font-size: 10px; color: #777777">';

 at12l+='<tr><td colspan="2"></td></tr>';

 at12l+='</table>';

 at12l+='</div>';

 at12K=document.createElement('div');

 at12K.innerHTML=at12l;

 

 document.body.insertBefore(at12K,document.body.firstChild);

 

 }





function addthis_to(at12R)

{

 addthis_closewin( );

 window.open(  at12y(at12R),'addthis','scrollbars=yes,menubar=no,width=620,height=400,resizable=yes,toolbar=no,location=no,status=no' );

 return false;

}





at12L();





function ieExecWB( intOLEcmd, intOLEparam )

{



  var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';

  document.body.insertAdjacentHTML('beforeEnd', WebBrowser);





	if ( ( ! intOLEparam ) || ( intOLEparam < -1 )  || (intOLEparam > 1 ) )

        intOLEparam = 1;

   WebBrowser1.ExecWB( intOLEcmd, intOLEparam );

   WebBrowser1.outerHTML = "";

}





//	checking across domains causes errors - this is to supress these



function handleError() {return true;}

window.onerror = handleError;





function ThisPageMarks()

{

 window.external.AddFavorite(ThisPageUrl, ThisPageTiTle)

 return false;

}



//<![CDATA[



var BODYHT     = document.getElementById("wrapper");

var bodyEl     = document.getElementById("contents");

var subLeftEl  = document.getElementById("conNav");

var subRightEl = document.getElementById("sidebar");



var contentsDev01El     = document.getElementById("contentsDev01");





var bodyEl_len     = 0;



 



 

if (bodyEl || contentsDev01El) {

	

	if (bodyEl)

    bodyEl_len     = bodyEl.offsetHeight;



 if (contentsDev01El)

    bodyEl_len     = contentsDev01El.offsetHeight;





	if (subLeftEl){

	  if ( bodyEl_len  < subLeftEl.offsetHeight )

	      bodyEl_len =  subLeftEl.offsetHeight;

	}





	if (subRightEl){

	  if ( bodyEl_len  < subRightEl.offsetHeight )

	      bodyEl_len  =  subRightEl.offsetHeight;

	}



 

   BODYHT.style.height = bodyEl_len +"px";

 

}

  

//]]>





 



    