
//frame.js

var goingwhere;

function show_visibility_iframe(id,vheight,vwidth) {
var e = parent.document.getElementById(id);
e.height = vheight;
e.width = vwidth;
}

function hide_visibility_iframe(id) {
var e = parent.document.getElementById(id);
e.height = '0';
e.width = '0';
}

function show_visibility(id,vheight) {
var e = parent.document.getElementById(id);
e.style.display = 'block';
e.style.height = vheight;
}

function hide_visibility(id) {
var e = parent.document.getElementById(id);
e.style.display = 'none';
e.style.height = '0';
}

function hide_caller() {
frames['iframetoggle2'].location.href = 'http://lopup.com/bin/htm/pleasewait.htm';
window.scrollTo(0,0);
hide_visibility_iframe('iframetoggle2');
hide_visibility('iframetoggle1');
}	
function jump (url) {
self.location.hash = url;
}

function go(inurl)
{
gourl = inurl;

lhostname = location.hostname;
if (gourl.indexOf(lhostname) == -1)
{
//show_visibility('iframetoggle1','100');
show_visibility_iframe('iframetoggle2','600', '978');
frames['iframetoggle2'].location.href = 'http://lopup.com/bin/htm/pleasewait.htm';

sOpenURL = "frames['iframetoggle2'].location.href = '" + inurl + "';"
setTimeout(sOpenURL,3000);

jump("#showframe");
}
else
{
window.location.href = inurl;
}
}
//-------------
// on load, log visit, reset hrefs
//-------------
function init() {
	function ResetHrefs(){ 
	   var l=document.getElementsByTagName("a"); 
	   var s = ""; 
	   for(i=0;i<l.length;i++){ 
	      s = "" + l.item(i); 
	      if(s.indexOf("http:") != -1){ 
	        if(s.indexOf("lopup.com") == -1 && s.indexOf("developer.yahoo.com") == -1){ 
	      	  if (document.getElementsByTagName('a').item(i).onclick == undefined) {
	            document.getElementsByTagName('a').item(i).onclick= Function('go("'+s+'")');
	      	    document.getElementsByTagName('a').item(i).target="_self";
	            document.getElementsByTagName('a').item(i).href= "#showframe";
	          }
	        }
	      }
	   	}    
	} 
	ResetHrefs();
}
window.onload = init;
