﻿var lstPg = window.location.href;

function getVar(url,cnt)
{
	url=url+'#';
	url=url.split('#');
	if (!url[1])
	{
	    window.location.href = '#TopPage,St1';
	    url = window.location.href;
	}
	url=url[1];
	url=url+',';
	url=url.split(',');
	return url;
}

function urlCheck()
{
	url=window.location.href;
	if (url.indexOf('?') != -1 && url.indexOf('?') < url.indexOf('#')) {
		url_temp = url.split('?');
		clearInterval(interval);
		href = url_temp[0];
		url=url+'#';
		url=url.split('#');
		if (url[1]) window.location.href = href+'?'+url[1];
		return;
	}
	if (url != '' && url != lstPg)
	{
	    window.location.href = window.location.href.replace('#','?')
	}
}
var interval = null;
function startLoad() {
//	interval = setInterval('urlCheck()',100);
}


function ShowNextFolderItem()
{
}

function back()
{
    history.go(-1);
}

function PrintSubject()
{

	if(!$('CContainer')) return false;
	w=open('', '_blank', 'width=520, height=500, scrollbars=1');
	w.document.writeln('<html>');
	w.document.writeln('<head>');
	w.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">');
	w.document.writeln('<link href="http://www.dps.com.vn/Css/StyleSheet.css" rel="Stylesheet" type="text/css" />');
	w.document.writeln('</head>');
	w.document.writeln('<body topmargin=3 leftmargin=0 marginheight=3 marginwidth=0>');
	w.document.writeln('<table cellspacing=0 cellpadding=0 border=0 width=500 align=center>');
	w.document.writeln('<tr>');
	w.document.writeln('<td>');
	w.document.writeln($('CContainer').innerHTML);
	w.document.writeln('</td>');
	w.document.writeln('</tr>');
	w.document.writeln('</table>');
	w.document.writeln('</body>');
	w.document.writeln('</html>');
	w.document.title = document.title;
	return false;
}

function EmailSubject(PageID)
{
    alert('Chức năng này sẽ được cập nhật sau.')
	return false;
}
