﻿// JScript File
function CheckIframe()
{
var qs = document.getElementById("scrV").src
var hsnm=qs.split("?")[1];
hsnm = hsnm.substr(hsnm.indexOf("//")+2,hsnm.length)
hsnm = hsnm.substr(0,hsnm.indexOf("/"))
hsnm = hsnm.replace(/www./i, "")
hsnm = hsnm.replace(/.com/i, "")
//alert(hsnm);

if (window.location!=top.window.location)
{
	var refu =self.document.referrer ;
	//alert("ref " + refu + "owner " + window.location.href );
	refu = refu.substr(refu.indexOf("//")+2,refu.length)
	refu = refu.substr(0,refu.indexOf("/"))
	//alert("test1" +refu);
	if (refu.indexOf(hsnm)<0 && hsnm!='localhost')
	{//alert("rerer"  );(|| refu.indexOf('stumbleupon')>0)
		top.location=window.location;
	}
}
//else
//{
//    var owner =window.location.href ;
//     //alert("ref1 " + self.document.referrer + "owner " + window.location.href );
//    if (owner.indexOf(".aspx")>0 && owner.indexOf("pagerd")<=0 )
//    {//alert("a");
//        top.location=".?pagerd=" + owner.replace('?','~~');
//    }

//}
}
CheckIframe();
