// Common functions and display items for IDON EAST Pages
var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()	{
	
	if (document.getElementById != null) {
		var html = '<html>\n<head>\n';

		if (document.getElementsByTagName != null) {
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}

		html += '\n</head>\n<body>\n';

		var printReadyElem = document.getElementById("printReady");

		if (printReadyElem != null)	{
			html += printReadyElem.innerHTML;
		} else {
			alert("Could not find the printReady function");
			return;
		}

		html += '\n</body>\n</html>';

		var printWin = window.open("","printSpecial");
		
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		
		if (gAutoPrint) { printWin.print(); }
	
	} else {
		alert("The print ready feature is only available if you are using an browser. Please update your browswer.");
	}
}

function AddBookmark()	{
	
	var title = "Sameng Inc.";
	var url = "http://www.sameng.com";
	
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

function ShowFooter() {
	
	document.write("<br>");
	
	document.write("<a href='javascript:void(AddBookmark())' style='text-decoration: none'>");
	document.write("<span class='bookmarkstyle'>|Bookmark|</span>");
	document.write("</a> ");
	document.write("&nbsp;&nbsp;");

	document.write("<a href='\contactus.html' style='text-decoration: none'>");
	document.write("<span class='bookmarkstyle'>|Contact Us|</span>");
	document.write("</a> ");
	document.write("&nbsp;&nbsp;");
	document.write("");
			


	document.write("<a href='\ term.html' style='text-decoration: none'>");
	document.write("<span class='bookmarkstyle'>|Terms of Use|</span>");
	document.write("</a> ");
	document.write("&nbsp;&nbsp;");
	

	document.write("<a href='\copyright.html' style='text-decoration: none'>");
	document.write("<span class='printstyle'>|© Copyright 2009|</span>");
	document.write("</a> ");
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ");



	


		
}

function DisplayNewsLink(sDate,sTitle,sURL) {
	
	
	document.write("<span class='newslinkdate'>" + sDate + "</span>");
	document.write("<br>");

				
}

function DisplayReadMore(sURL) {
	
	document.write("<div align='right'>");
	document.write("<a href='" + sURL + "' style='text-decoration: none'><img src='images/read_more.gif' border='0' align='middle'> <span align='right' class='newslinkreadmore'>read more</span></a>");
	document.write("</div>");
				
}

function SectionHead(sTitle) {					
				
	
	document.write("<span class='sectionhead'>" + sTitle + "</span>");
	document.write("");
				
}

function SectionHeadproject(zTitle) {					
				
	
	document.write("<span class='sectionheadproject'>" + zTitle + "</span>");
	document.write("");
				
}

