/* Break page out of parent frame (like when clicking on links from hotmail emails) */
if (top.frames.length > 0)
{
 top.location=self.location;
}


/*
===============================================================================
KPC AB-NETWORK CONFIG
Version 3.0 - Modified: 07/29/2003 (drv)
-- upgrade phpadsnew 2.0 RC 4.1
===============================================================================
*/


// AB-NETWORK SETTINGS: USER DEFINED VARIABLES

// use the following to enable/disable serving ab-network on the site [0:disable;1:enable]
var ABNstatus = 1;

// set this variable to specify the number of zones/page
var ABNzonecount = 5;

// set this variable to the root of the ab-network scripts for the site
var ABNserver = 'http://abn.kalmbach.com/scripts/baj/';

// cookie prefix name
var ABNcprefix = 'BNB';

// login status keyword, used to determine whether the  ad is shown. See abn_popups.js for more details.
var adType = '';

/*

AB-NETWORK FUNCTIONS: USER DEFINED FUNCTIONS

User defined Wrapper Functions
The following are for user defined wrapper functions for the main function

Ad Positions:
	SP - Sponsorship position on the top
   R1, R2, R3 - Standard set of positions on the right side
   H1 - inHouse position on the right side

*/

function DisplayAdsTL1(zoneid) {DisplayAds(1,zoneid,300,250,'','',0);}
function DisplayAdsR1(zoneid) {DisplayAds(1,zoneid,300,70,'','',0);}
function DisplayAdsR2(zoneid) {DisplayAds(1,zoneid,300,70,'','',0);}
function DisplayAdsR3(zoneid) {DisplayAds(1,zoneid,300,70,'','',0);}
function DisplayAdsR4(zoneid) {DisplayAds(1,zoneid,300,70,'','',0);}

function DisplayAdsVideo(sectionid) {
    var zoneid;

    switch (sectionid) {
        case "{DCA9B3B6-6C3A-4A90-A40E-C5B21E10CBA2}": // Watch & stitch
            zoneid = 30;
            break;
        case "{07311035-EE56-4957-98D3-BA9749C1B5CE}": // Stringing Basics
            zoneid = 39;
            break;
        case "{1024FBED-B805-4C81-9722-170B12E7DF50}": // Knots
            zoneid = 32;
            break;
        case "{C4C1246F-BE4B-4D54-ACC7-DE3B71EF7C63}": // Wire
            zoneid = 40;
            break;
        case "{F943482A-9CA8-4031-AD41-70723B621A47}": // Ndebele herringbone
            zoneid = 33;
            break;
        case "{7122C6ED-5917-4726-9804-7B36AE97F68A}": // Peyote
            zoneid = 34;
            break;
        case "{3B2EE3BD-30DB-4045-8223-B97F7C82A56C}": // Interviews
            zoneid = 43;
            break;
        case "{A9823B2F-2A3D-4C09-BB4C-59679908811E}": // From the pages of Bead & Button
            zoneid = 29;
            break;
        case "{506F498A-4E19-427A-99BD-429F3CD2601D}": // Brick Stitch
            zoneid = 31;
            break;
        case "{5A237DF7-8070-40DE-8AEF-132F9F206D36}": // Right Angle Weave
            zoneid = 35;
            break;
        case "{EACF2A17-DD40-4F66-8B2C-FDA18C517A23}": // Square Stitch
            zoneid = 37;
            break;
        case "{852E7269-3446-4E41-AC7D-E9E82A9F867B}": // Stitching Basics
            zoneid = 38;
            break;
        case "{A20908C4-C97F-4C5B-957F-937F440CB466}": // Polymer Clay
            zoneid = 41;
            break;
        case "{755B4BF5-12E8-47D5-9E27-670E5C1D88FD}": // Loomwork
            zoneid = 42;
            break;
		case "{48F20B76-683A-4741-9151-276FC11F26E8}": // Netting
			zoneid = 64;
			break;
        default:
            zoneid = arrayAdZones[1];
            break;
    }

    DisplayAds(1, zoneid, 486, 70, '', '', 0);
}

/*

AB-NETWORK FUNCTIONS: POPUP/UNDER OVERRIDES

The following functions will allow for an override of the default settings for
a zone which have been coded in by section/zone.  The two overrides which exist
are for zones (global for that specific zone) and by bannerid (specific to that
banner).

*/

function PopAdsZoneOverride(zoneid) {

	//zoneid,poptype,positionx,positiony
	var arrayOverride = new Array();
	arrayOverride[0] = [151,'popunder','right','top'];
	//arrayOverride[1] = [150,'','left','top'];
	//arrayOverride[2] = [134,'','left','bottom'];
	//arrayOverride[3] = [2,'','left','top'];

	//step through override array
	if (arrayOverride.length==0) {return;}
	for (var i = 0; i < arrayOverride.length; i++) {
		if (arrayOverride[i][0] == zoneid) {return arrayOverride[i];}
	}
}

function PopAdsBannerOverride(bannerid) {

	//zoneid,poptype,positionx,positiony
	var arrayOverride = new Array();
	//arrayOverride[0] = [31,'','right','top'];
	//arrayOverride[1] = [29,'','left','bottom'];

	//step through override array
	if (arrayOverride.length==0) {return;}
	for (var i = 0; i < arrayOverride.length; i++) {
		if (arrayOverride[i][0] == bannerid) {return arrayOverride[i];}
	}
}

function DisplayByStatus (keyword) { adType = keyword.replace(",%2Ballpages",""); DisplayKeyword(keyword); }


/*
-------------------------------------------------------------------------------
WEBSITE SCRIPT FUNCTIONS: USED BY HTML BANNERS AND SITE BASED SUB PROMOTIONS
-------------------------------------------------------------------------------
*/

	function submitPromoForm(filename,windowname,properties) {

		mywindow = window.open(filename,windowname,properties);
		mywindow.focus();

	}


