/* 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 = 'BDS';

// 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 DisplayAdsCSForum(zoneid) {DisplayAds(1,zoneid,468,60,'','',0);}
function DisplayAdsBL1(zoneid) {DisplayAds(1,zoneid,728,90,'','',0);}
function DisplayAdsSP(zoneid) {DisplayAds(1,zoneid,728,90,'','',0);}
function DisplayAdsH1(zoneid) {DisplayAds(1,zoneid,120,240,'','',0);}
function DisplayAdsP1(zoneid) {DisplayAds(1,zoneid,250,250,'','',0);}

function DisplayAdsVideo(sectionid) {
    var zoneid;

    switch (sectionid) {
        case "{6DAC416E-2C6B-420C-85C4-701D90B2FBC6}": // Beads, Baubles and Jewels
            zoneid = 48;
            break;
        case "{7C0D9A1D-B843-4F50-8D59-13A91112EC84}": // Stringing Basics
            zoneid = 49;
            break;
        case "{02CD2F31-CAE3-4D86-878F-F656EE4B04C5}": // Knots
            zoneid = 50;
            break;
        case "{9C74C92E-DFCA-41CE-8617-7D0BEC44E3E4}": // Wire
            zoneid = 51;
            break;
        case "{06C0F468-89E3-427B-9335-6F0E1267EA2C}": // Cool Jewels
            zoneid = 47;
            break;
        case "{06BE45B6-DDEA-4B9E-894F-E9F19A8E25C8}": // Interviews
            zoneid = 52;
            break;
        case "{080C27EB-21B0-4840-976E-833D6C712817}": // From the Pages of Bead Style
            zoneid = 45;
            break;
        case "{F39C25CA-04E9-4604-AA2C-C8C6B5D0BFBC}": // Seconds to Style
            zoneid = 46;
            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();

	}


