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 calculatearticleIndexImgBrdrCssProperties(article) 
{
	if (article=='thirdarticle')
	{
		document.getElementById("articalcontainer").style.height=document.getElementById("articlelinks").offsetHeight+235;
		document.getElementById("articalcontainerborder").style.height=document.getElementById("articlelinks").offsetHeight+150;
		//document.getElementById("whiteborder").style.height=document.getElementById("articlelinks").offsetHeight+178;
	//	document.getElementById("outerborder").style.height=document.getElementById("articlelinks").offsetHeight+151;
		document.getElementById("copyart").style.height=document.getElementById("articalcontainerborder").offsetHeight-68;
		document.getElementById("articlefooter").style.top=document.getElementById("articlelinks").offsetHeight+213;
		document.getElementById("articlefooter").style.left=485;
		
	}else if (article=='firstarticle')
	{
		articlelinks
		var ht = document.getElementById("articlelinks").offsetHeight;
		if(ht<150){
			document.getElementById("articalcontainer").style.height=ht+430;
			document.getElementById("articalcontainerborder").style.height=ht+430;
			//document.getElementById("whiteborder").style.height=578;
			//document.getElementById("outerborder").style.height=551;
			document.getElementById("copyart").style.height=document.getElementById("articalcontainerborder").offsetHeight-58;
			document.getElementById("articlefooter").style.top=ht+480;
			document.getElementById("articlefooter").style.left=485;
		}else{
			document.getElementById("articalcontainer").style.height=ht+130;
			document.getElementById("articalcontainerborder").style.height=ht+130;
			//document.getElementById("whiteborder").style.height=578;
			//document.getElementById("outerborder").style.height=551;
			document.getElementById("copyart").style.height=document.getElementById("articalcontainerborder").offsetHeight-58;
			document.getElementById("articlefooter").style.top=ht+180;
			document.getElementById("articlefooter").style.left=485;
		}
		
	}
}

function openWin(page) {
    var win_width = 400;
    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 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('submitBtn').className = 'thide'; 	
  document.getElementById('processing').className = 'tshow';
}

/* Display mouse over copy on index page */	


var tipwidth='150px'; //default tooltip width
var tipbgcolor='lightyellow' ; //tooltip bgcolor
var disappeardelay=10 ; //tooltip disappear speed onMouseout (in miliseconds)
var vertical_offset="0px" ;//vertical offset of tooltip from anchor link
var horizontal_offset="0px"; //horizontal offset of tooltip from anchor link

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, tipwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (tipwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=tipwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}

function fixedtooltip(menucontents, obj, e, tipwidth){


if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidetip()
dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
dropmenuobj.innerHTML=menucontents

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
}

function hidetip(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidetip(){
if (ie4||ns6)
delayhide=setTimeout("hidetip()",disappeardelay)
}

function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}


function openWin(page,win_width,win_height) {

    try {
    	popup_window.close();
    } catch(e) {
					
    }

    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() }
    }
}


function openPopupWindow(page,win_width,win_height) {
    try {
    	popup_window.close();
    } catch(e) {
					
    }
	
	 if ( page.indexOf("mailto") == -1 && page.indexOf("pop_") != -1) {
	 		var options = "scrollbars=yes, width=516" + ", height=460";
    	var win = window.open(page, 'MyWin', options);
    	if (window.focus) { win.focus() }
    	return;
	 }
	
	
    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() }
    }
}
function htarticle(){
	if (navigator.appVersion.indexOf("MSIE")!=-1)
       {
       }else {
	   	if((document.getElementById("popcontainer")!=null) && (document.getElementById("popFooter")!=null)){
			document.getElementById("popcontainer").style.height=document.getElementById("popContentAlign").offsetHeight+130;
			document.getElementById("popFooter").style.top=document.getElementById("popContentAlign").offsetHeight-2280;
		}
	}
}

