
/*    (c)    */
/*  v 2.00b  */



////////////////  p r e f e r e n c e s ////////////////

swim_over = '_over' ;		// マウスオーバー時の画像のファイル名
swim_current = '_on' ;		// カレント反転時の画像のファイル名（無しでもOK）

puim_title = ' | Trend Micro Smart Protection Network : 主動式雲端截毒' ;		// 画像ポップアップウィンドウ<title>のサイト内で共通の部分
puim_name_default = '放大' ;		// 画像ポップアップウィンドウ<title>の画像ごとに変わる部分のデフォルト名



////////////////  s w i m  ////////////////

img = new Array () ;

function swim ( p , q ) {

	name = ( p.length ) ? document[p].name : p.name ;

	if ( img[name] ) {

		swap_img = img[name] ;
		img[name] = '' ;

	} else {

		if ( document[name].src.indexOf( swim_over + '.' ) == -1 ) {

			img[name] = document[name].src ;
			img[name].match( /(\.[^.]+)$/ ) ;
			swap_img = img[name].replace( RegExp.$1 , swim_over + RegExp.$1 ) ;
			swap_img = swap_img.replace( swim_current , '' ) ;

		} else {

			return false ;

		}

	}

	document[name].src = swap_img ;

	if ( q ) {
		 swim ( q ) ;
	}

}


function prld () {

	prld_i = new Array () ;

	for ( i in document.images ) {
		prld_n = document.images[i].name ;
		if ( prld_n ) {
			prld_s = document.images[prld_n].src ;
			if ( prld_s.indexOf( swim_over + '.' ) == -1 ) {
				prld_s.match( /(\.[^.]+)$/ ) ;
				prld_s = prld_s.replace( RegExp.$1 , swim_over + RegExp.$1 ) ;
			}
			prld_i[prld_n] = new Image () ;
			prld_i[prld_n].src = prld_s ;
		}
	}

}



////////////////  p o p u p  ////////////////


function puwd ( p , w , h , n ) {

	n = ( n ) ? n : '_blank' ;
	wn = window.open( p , n , 'width=' + w + ',height=' + h + ',scrollbars=yes' ) ;
	wn.focus() ;

}


function puim ( p , t ) {

	w = 50 ;
	h = 105 ;

	t = ( t ) ? t : puim_name_default ;

	wn = window.open( '' , p.target , 'width=800,height=100' ) ;
	wn.focus() ;

	wn.document.open() ;
	wn.document.write(
		'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' + 
		'<title>' + t + puim_title + '</title>' +
		'<body style="text-align:center;background:#fff">' +
		'<div id="la" style="color:#999;font-weight:bold">Now Loading...</div>' +
		'<div id="ia" style="visibility:hidden">' +
		'<a href="javascript:window.close()"><img name="ih" src="' + p + '" border="0" onLoad="resizeTo(document.ih.width+' + w + ',document.ih.height+' + h + ');document.getElementById(' + "'" + 'la' + "'" + ').style.display=' + "'" + 'none' + "'" + ';document.getElementById(' + "'" + 'ia' + "'" + ').style.visibility=' + "'" + 'visible' + "'" + '" alt="' + t + '" /></a>' +
		'</div>' +
		'<div style="margin-top:10px;color:#888;font-size:9pt">※點選圖片關閉視窗</div>' +
		'</body>' +
	'' ) ;
	wn.document.close() ;

}



////////////////  p a g e  t o p  ////////////////


function gtpt () {

	 scrollTo( 0 , 0 ) ;

}

