
/*
*
*
*	Popup
*	<a href="xxx.html" onclick="m_win(this.href,'window',1000,1000); return false;">
*
*/

function m_win(url,windowname,width,height) {
 var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}







/*
*
*
*	slideScroll
*	Licensed under the GNU Lesser General Public License version 2.1
*	Copyright (c) 2008 nori (norimania@gmail.com)
*	http://moto-mono.net
*	Licensed under the MIT
*
*
*/

(function(){

var interval = 20;
var easing = 0.6;
var comeLink = false;
	
var d=document,dE=d.documentElement,lH=location.hash,timer,t,p={},a=d.getElementsByTagName("a"),$h=function(hash){return document.getElementById(hash.replace("#",""));}
function cp(){return{x:d.body.scrollLeft||dE.scrollLeft,y:d.body.scrollTop||dE.scrollTop}}
function sp(t){var h=dE.clientHeight,w=dE.clientWidth,mH=dE.scrollHeight,mW=dE.scrollWidth;p.top=(mH-h)<t.offsetTop?mH-h:t.offsetTop;p.left=(mW-w)<t.offsetLeft?mW-w:t.offsetLeft;}
function np(){var x=cp().x,y=cp().y,sx=Math.ceil((x-p.left)/(5*easing)),sy=Math.ceil((y-p.top)/(5*easing));return{x:x-sx,y:y-sy,ax:sx,ay:sy}}
function scroll(){timer=setInterval(function(){np();if(Math.abs(np().ax)<1&&Math.abs(np().ay)<1){clearInterval(timer);window.scroll(p.left,p.top);}
window.scroll(np().x,np().y);},interval);}
function hs(){if(!$h(lH))return false;sp($h(lH));window.scroll(0,0);if(document.all)setTimeout(function(){scroll();},50);else scroll();}
function sus(){for(var i=0;i<a.length;i++){if(a[i].hash&&$h(a[i].hash)&&a[i].href.match(new RegExp(location.href.split("#")[0]))){a[i].onclick=function(){clearInterval(timer);sp($h(this.hash));scroll();return false;}}}}
function ae(t,l,fn){try{t.addEventListener(l,fn,false);}catch(e){t.attachEvent("on"+l,function(){fn.apply(t);});}}
if(comeLink&&lH)ae(window,"load",hs);ae(window,"load",sus);})();





/*
*
*
*	autoLinkBlank
*
*
*/

function relTags() {
if (document.getElementsByTagName) {
var anchors = document.getElementsByTagName( "a" );
for (var loop = 0; loop < anchors.length; loop++) {
var anchor = anchors[loop];
if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
anchor.target = "_blank";
}
}
}
}

window.onload = function() {
relTags();
}




