
function fnPrint() {
	menuID=document.getElementById('vMenu_ID').value
	TakeMeThereNew('index.asp?menuID='+menuID+'&fprint=Y',menuID);
}

function TakeMeThereNew(action, vMenu_ID) {
	var settings = 'toolbar=0,status=1,location=no,menubar=no,directories=no,scrollbars=yes,resizable=yes,top=0,left=0,width=800,height=600';
	var mywin = window.open('blank.htm','subPrintWin', settings);
	this.document.forms[0].vMenu_ID.value = vMenu_ID;
	this.document.forms[0].target = 'subPrintWin';
	this.document.forms[0].method = 'post';
	this.document.forms[0].action = action;
	this.document.forms[0].submit();
}

function getLink(strCtrlName){
	TakeMeIPublish('/index.asp', $(strCtrlName).options[$(strCtrlName).selectedIndex].value);
}



function fnProcessPrint(){
    for (var j=0; j<20; j++) {
	    if (document.getElementById('printhide'+j)) {
		    document.getElementById('printhide'+j).style.display = 'none';
	    }
    }

    var sHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td style="padding-right:3px;background-color:#fffff" width="100%">';
       sHTML += '<p align="right"><a href="javascript:print()"><font color="#ffffff">print</font></a></p></td>';
       sHTML += '<td style="padding-right:3px;background-color:#fffff"><a href="javascript:print()"><img src="/g_images/icon_print.gif" alt="print" ';
       sHTML += 'border="0" align="middle"></a>&nbsp;&nbsp;</td>';
       sHTML += '<td style="padding-right:3px;background-color:#fffff"><input type="button" name="close" value="close window" class="sysbut" onClick="javascript:parent.close();"></td></tr></table><HR/>';

    document.getElementById('fprint_header').innerHTML = sHTML;
    document.getElementById('fprint_header').style.display = '' ;
    document.body.style.background = '#ffffff' ;

    //if (document.getElementById('pfContactUsForm')) document.getElementById('ipfContactUsForm').style.display = 'none';
}

//To display the menu after all the styles are displayed
function DisplayMenus(){
	if ($('dvMenu')){
		$('dvMenu').style.display='';
	}
}


function printMeIE() {
	var OLECMDID = 7;
	/* OLECMDID values:
	* 6 - print
	* 7 - print preview
	* 1 - open window
	* 4 - Save As
	*/
	var PROMPT = 1; // 2 DONTPROMPTUSER
	var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
	WebBrowser1.ExecWB(OLECMDID, PROMPT);
	WebBrowser1.outerHTML = "";
}

function printMe() {
	if (window.print) {
		window.print();
	} else {
		alert('To print this page, select "File" > "Print" from the main menu of your browser.');
	}
}

function emailMe() {
	Shadowbox.open({
        player:     'iframe',
        title:      'Email article',
        content:    'modules/EmailArticle.asp?mode=form&ref='+ escape(location.href),
        height:     400,
        width:      330
    });
}

function pdfMe() {
}

Shadowbox.loadSkin('classic', 'js/shadowbox/skin/');
Shadowbox.loadLanguage('en', 'js/shadowbox/');
Shadowbox.loadPlayer(['img', 'html', 'iframe'], 'js/shadowbox/');

Event.observe(window, 'load', function() {
	//Shadowbox.init;
	Shadowbox.init({skipSetup:true});
});
