//This is the Force-FrameSet Script

// this array contains all your domains except the default one
domains = new Array(
'file:///C:/webworks/zasco',  // this one is the path when you work locally, keep it first in the array, and keep one even if you don't need it
'bigvideoscreen.com',
'bostonaudiovisual.com',
'commencementvideo.com',
'giantvideoscreen.com',
'hartfordav.com',
'imagemagnification.com',
'massav.net',
'midco-av.com',
'springfieldaudio.com',
'springfieldav.com',
'springfieldconventioncenter.com',
'springfieldproductions.com',
'zasco.info',
'zasco.org',
'zasco.us',
'zasko.com',
'zasco.tv',
'zasco.net',
'zasco.biz',
'zascoproductions.com'  // no colon for the last item in the array
)


thispage = window.location.href;


// this is the default domain
theDomain = 'zasco.com';

for (i=0; i<domains.length; i++)
{
	if (thispage.indexOf(domains[i]) != -1)
	{
		theDomain = domains[i];
		break;
	}
}

// in this pattern, your specify all the extensions that you use: html, php, etc.
pattern = /([^\/]*?\.(?:html|htm|php|mpl))\?*([\w=&]*)/;

//alert(unescape(thispage));

thispage = unescape(thispage).match(pattern);

//alert(thispage[1]);

//alert(thispage[2]);


// if we don't work locally (the first item of the domains array)
if (theDomain != domains[0])
{
	theDomain = 'http://www.' + theDomain;
}

framesetpage = theDomain + '/index.html';

if (thispage[1])
{
	framesetpage += '?subpage=' + thispage[1];
	if (thispage[2])
	{
		framesetpage += '&' + thispage[2];
	}
}


//alert(framesetpage);

if (parent.location.href == window.location.href)
{
	parent.location.replace(framesetpage);
}
