﻿// JScript File

if(location.protocol)
{
	var vsPro = new String(location.protocol)
	var vsHost = new String(location.host)
    if (vsPro.toUpperCase() != 'HTTPS:' || vsHost.toUpperCase() != "WWW.INSURANCEMALL.IN")
    {
        if(location.pathname == "/")
        {
//	        window.location.replace("https://www.insurancemall.in/Forms/frm_G_Home_Page.aspx")
	        window.location.replace("https://www.insurancemall.in/")
        }
        else
        {
	        window.location = 'https://www.insurancemall.in' + location.pathname + location.search;
        }
    }
}
else
{
//	window.location.replace("https://www.insurancemall.in/Forms/frm_G_Home_Page.aspx")
	        window.location.replace("https://www.insurancemall.in/")
}

/*
addListeners();
function addListeners()
{
    if(window.addEventListener)
    {
        window.addEventListener('ondragstart', Supress, false); 
        window.addEventListener('onselectstart', Supress, false); 
        window.addEventListener('oncontextmenu', Supress, false); 
    }
    else if (window.attachEvent)
    {
        window.attachEvent('ondragstart', Supress);
        document.attachEvent('ondragstart', Supress);
        window.attachEvent('onselectstart', Supress);
        document.attachEvent('onselectstart', Supress);
        document.attachEvent('oncontextmenu', Supress);
        window.attachEvent('oncontextmenu', Supress);
    }
}
function Supress()
{
    if (document.layers)
    {
	    event.preventDefault();
    }
    else
    {
        return false;
    }
}


var message="Function Disabled!";
function clickIE4()
{
    if (event.button==2)
    {
        //alert(message);
        return false;
    }
}

function clickNS4(e)
{
    if (document.layers||document.getElementById&&!document.all)
    {
        if (e.which==2||e.which==3)
        {
            //alert(message);
            return false;
        }
    }
}

if (document.layers)
{
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById)
{
    document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")
//document.oncontextmenu=new Function("alert(message);return false")


var debug = true; 
function right(e) 
{ 
    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; 
    else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) 
    { 
        return false; 
//    { alert('This Page is fully protected!'); return false; 
    } 
    return true; 
} 
document.onmousedown=right; 
if (document.layers) 
window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right;
*/