if(self!=top){
  try{ top.location.replace(self.location.href) }
  catch(e){ top.location.href=self.location.href }
}


window.swap=function(o){
  o_t = document.getElementById('swaptarget')
  o_s = document.getElementById(o.name+'_s')
  if(o_t && o_s){ o_t.innerHTML = o_s.innerHTML }
  return false
}


window.mPopUp = function(sURL,sName,sFeatures,x,y,w,h){
  this.x = (x || 25); this.y = (y || 25); this.w = (w || 450); this.h = (h || 755)
  if(!sName) sName = 'NScompare'
  if(!sFeatures){ sFeatures = 'menubar = 0' }
  if(sFeatures.indexOf('top')==-1)        sFeatures += ',top = '+this.y
  if(sFeatures.indexOf('left')==-1)       sFeatures += ',left = '+this.x
  if(sFeatures.indexOf('screenY')==-1)    sFeatures += ',screenY = '+this.y
  if(sFeatures.indexOf('screenX')==-1)    sFeatures += ',screenX = '+this.x
  if(sFeatures.indexOf('width')==-1)      sFeatures += ',width = '+this.w
  if(sFeatures.indexOf('height')==-1)     sFeatures += ',height = '+this.h
  if(sFeatures.indexOf('resizable')==-1)  sFeatures += ',resizable = 1'
  if(sFeatures.indexOf('scrollbars')==-1) sFeatures += ',scrollbars = 1'
  if(sFeatures.indexOf('toolbar')==-1)    sFeatures += ',toolbar = 0'

  var mWin = window.open(sURL,sName,sFeatures)
  return mWin
}


window.handleclick=function(o,w,h){
	if(window.mPopUp) window.mPopUp(o.href,'mpop','resizeable=0,toolbar=0',0,0,w,h); return false
}
window.hc = handleclick