/* =========================================================================

JavaScript Source File 

NAME: adidas Glossary Javascript include file

AUTHOR: Ben Hindmarch, de-construct
DATE  : 23/01/2006
VER	  : 1.03

COMMENT: Global include for javascript glossary popup. 
USAGE:  glossary_popup(glossary term (string)[, country code (string)]);

============================================================================ */

function glossary_popup(term, cc) {

	// whatsnext glossary
	//var glossary = window.open('/campaigns/whatsnext/content/microsites/glossary/?s=' + term + '&win=suppress&strCountry_adidascom=' + cc, 'adidasGlossaryPopup', 'width=600,height=530,location=no,menubar=no,resizable=no,scrollbars=no,status=no');
	
	// techlab glossary (required innozone cc conversion also)
	//var glossary = window.open('http://www.adidas.com/products/techlab/content/glossary/glossary.asp?country='+ cc +'&anchor=' + txterm, 'adidasGlossaryPopup', 'width=620,height=409,location=no,menubar=no,resizable=no,scrollbars=no,status=no');	
	
	// innovationzone glossary - current.
	if (!cc) cc='uk';
	if (cc=='com') cc='uk';
	txterm = translate_to_innovationzone_term( term );
	cc=cc.toUpperCase();
	var glossary = window.open('http://www.adidas.com/campaigns/innovationzone/content/content/glossary/glossary.asp?country='+ cc +'&anchor=' + txterm, 'adidasGlossaryPopup', 'width=620,height=409,location=no,menubar=no,resizable=no,scrollbars=no,status=no');
}


/**
* USAGE: translate_to_innovationzone_term( term (string) );
* DESCRIPTION: converts a whatsnext glossary term to the relevant anchor string for the existing innovationzone glossary.
*
* @param string term to be translated from 'whatsnext' glossary item to 'innovationszone' item
* @return string term
*/
function translate_to_innovationzone_term( term ) {
	
	var tx = new Object();
	tx["climacool_techfit"] = 'climacool_techfit'
	tx['climacool_tpu'] = 'tpu';
	tx['clima365'] = '365';
	tx['climacool_apparel'] = 'climacool';
	tx['climalite'] = 'climalite';
	tx['climaproof_apparel'] = 'climaproof_apparel';
	tx['climawarm'] = 'climawarm';
	tx['climacool_flowmapping'] = 'climacool_flowmapping';
	tx['formotion'] = 'formotion';
	tx['jetconcept'] = 'jetconcept';
	tx['a3'] = 'a3';
	tx['adituff'] = 'adituff';
	tx['adiprene'] = 'adiprene';
	tx['adiprene_plus'] = 'adipreneps';
	tx['adiwear'] = 'adiwear';
	tx['climacool_footwear'] = 'climacool';
	tx['climaproof_footwear'] = 'climacool';
	tx['exchangeable_power_pulse'] = 'powerpulse';
	tx['geofit'] = 'geofit';
	tx['geofit_frame'] = 'geofit';
	tx['gcs'] = 'gcsroad';
	tx['gcs_trail'] = 'gcstrail';
	tx['hug'] = 'hug';
	tx['predator'] = 'predato';
	tx['promoderator'] = 'promoderator';
	tx['quickstrike'] = 'quickstrike';
	tx['seamfree'] = 'seamless';
	tx['torsion'] = 'torsion';
	tx['traxion'] = 'traxion';
	tx['x_traxion'] = 'traxion';
	
	return tx[term];
}