<?php
function jsReload( $window = "window" )
{
	echo '
<script> '. $window .'.location.reload(); </script>';
}

function jsTWinReload()		//用来刷新最高级(父)窗口
{
	jsReload( "top" );
}

function jsTWinReset( $form_name )
{
	echo '
<script> top.document.'. $form_name .'.reset();</script>';
}

function jsTWinAlert( $msg = "你没有这个权限" )	//在顶级窗口弹出警告
{
	echo '
<script> top.alert("'. $msg .'"); </script>';
}

function jsSelfClose()	//关闭当前窗口
{
	echo '
<script> window.close(); </script>';
}

function jsGo2Url ( $url , $window="window" )
{
	echo '
<script> '. $window .'.location.href="'. $url .'"; </script>';
}

function jsTWin2Url( $url )		//顶级窗口跳转到$url
{
	jsGo2Url( $url , "top" );
}

function jsTWinBack($num="-1")
{
	echo '
<script> top.history.go('.$num.'); </script>';
}

?>