// JavaScript Document

function ClickHereToPrint(){
    try{ 
        var oIframe = document.getElementById('ifrmPrint');
        var oContent = document.getElementById('divToPrint').innerHTML;
        var oDoc = (oIframe.contentWindow || oIframe.contentDocument);
        if (oDoc.document) oDoc = oDoc.document;
		oDoc.write("<html><head><title>title</title>");
		oDoc.write("</head><body onload='this.focus(); this.print();'>");
		oDoc.write(oContent + "</body></html>");	    
		oDoc.close(); 	    
    }
    catch(e){
	    self.print();
    }
}

function printSelection(divId)
{
	var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>STRATEGIC BUSINESS DEVELOPMENT CENTER CO., LTD</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="css/www.css" rel="stylesheet" type="text/css" /><link href="css/text.css" rel="stylesheet" type="text/css" />';

	html += '</head><body>';
	
	var printReadyElem = document.getElementById(divId);
	
	html += printReadyElem.innerHTML;
	
	html += '</body></html>';
	
	var printWin = window.open("","printSpecial",'toorlbar=no,location=no,scrollbars=no, status=no,resizable=no,width=0,height=0');
	printWin.document.open();
	printWin.document.write(html);
	printWin.document.close();
	printWin.print();
	printWin.close();
}

function trainingCalendar(m,y)
	{
		window.location.href='public-calendar.php?sel_month='+m+'&sel_year='+y;
	}
	
function doSubscribe()
	{
		if(document.getElementById('subscribeTxt').value=='')
		{
			alert('Please input your email.!!!');
			return false;	
		}
		else
		{
			document.getElementById('subscribeFrm').submit();
			return true;	
		}
	}