function resetSubmitBtn() {
  document.getElementById('button').className = 'tshow'; 	
  document.getElementById('processing').className = 'thide';
}

function nonFormCSS() {
	var headerHeight = document.getElementById("nonformHeader").offsetHeight;
	var copyHeight = document.getElementById("nonform").offsetHeight;
	document.getElementById("footernoform").style.top=headerHeight+copyHeight+20;
	document.getElementById("copyrightnoform").style.top=headerHeight+copyHeight+20;
}

function openWin(page) {
    var win_width = 500;
    var win_height = 500;
    var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    var win = window.open(page, 'MyWin', options);
    if (window.focus) { win.focus() }
}
function doProcessing() {
  document.getElementById('button').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
}

function openWindow( URL, width, height, resizable, scrollbars)
{
  try
	{
		newWindow.close(); 
	}
	catch(e)
	{
				
	}

	newWindow=window.open( URL,'page',"status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=" + resizable + ",scrollbars=" + scrollbars + ",width=" + width + ",height=" + height + ",screenX=100,screenY=100");	
    window.onerror = null;
} 


function doProcessing() {
  document.getElementById('button').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
}

function openPopupWindow(page) {

    try {
    	popup_window.close();
    } catch(e) {
					
    }
   var win_width = '520px';
   var win_height = '350px';
   if (page=='articles/options.jsp')
   {
   	win_width = '630px';
	win_height = '700px';
   }

    if ( page.indexOf("mailto") == -1 ) {
    	var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    	var win = window.open(page, 'MyWin', options);
    	if (window.focus) { win.focus() }
    }
}


/**
  *
  *	 This function is for applying dynamic CSS to article pages 
  *
  */ 

function calculatearticleIndexImgBrdrCssProperties(article) 
{
	
	if (article=='thirdarticle')
	{
		document.getElementById("articalcontainer").style.height=document.getElementById("articlelinks").offsetHeight+235;
		document.getElementById("articalcontainerborder").style.height=document.getElementById("articlelinks").offsetHeight+175;
		document.getElementById("whiteborder").style.height=document.getElementById("articlelinks").offsetHeight+187;
		document.getElementById("outerborder").style.height=document.getElementById("articlelinks").offsetHeight+151;
		document.getElementById("copyart").style.height=document.getElementById("articlelinks").offsetHeight+60;
		document.getElementById("articlefooter").style.top=document.getElementById("articlelinks").offsetHeight+213;
		document.getElementById("articlefooter").style.left=485;
		
	}else if (article=='firstarticle')
	{
		document.getElementById("articalcontainer").style.height=635;
		document.getElementById("articalcontainerborder").style.height=575;
		document.getElementById("whiteborder").style.height=587;
		document.getElementById("outerborder").style.height=551;
		document.getElementById("copyart").style.height=460;
		document.getElementById("articlefooter").style.top=615;
		document.getElementById("articlefooter").style.left=485;
		
	}
}

function openFacilityWin(page) {
	var win_width = 600;
    var win_height = 900;
    var options = "scrollbars=yes, width=" + win_width + ", height=" + win_height;
    var win = window.open(page, 'Facility', options);
}
