var etype = new Object(); 
etype = {group:1, products:2, product:3, modelgroup:4, models:5, model:6} 

function navigate(type, groupId, catEntryTypeId, catEntryId, context) {
	if (type == etype.group) {
		navGroup(groupId, catEntryTypeId);
	}
	else if (type == etype.products) {
		navProducts(groupId, catEntryTypeId);
	}
	else if (type == etype.product) {
		navProduct(catEntryId);
	}
	else if (type == etype.modelgroup) {
		navModelGroup(groupId, catEntryTypeId);
	}
	else if (type == etype.models) {
		navModels(groupId, catEntryTypeId);
	}
	else if (type == etype.model) {
		navModel(catEntryId);
	}
	return;	
}

function navigateBrowse(type, groupId, catEntryTypeId, catEntryId, context) {
	if (type == etype.group) {
		navGroup(groupId, catEntryTypeId);
	}
	else if (type == etype.products) {
		navProductsBrowse(groupId, catEntryTypeId);
	}
	else if (type == etype.product) {
		navProduct(catEntryId);
	}
	return;	
}


function navigateMyspace() {
	var str="";
	str = 'http://www.myspace.com';
	str += '/';
	str += myspace;
	location.href=str;
}

function navigateFacebook() {
	var str="";
	str = 'http://www.facebook.com';
	str += '/';
	str += myspace;
	location.href=str;
}

function navigateTwitter() {
	var str="";
	str = 'http://www.twitter.com';
	str += '/';
	str += myspace;
	location.href=str;
}

function navigateLinkedIn() {
	var str="";
	str = 'http://www.linkedin.com';
	str += '/';
	str += myspace;
	location.href=str;
}

function navigatePromoAd() {
	var str="";
	str = 'ads.htm'
	location.href=str;
}

function navigateCareers() {
	var str="";
	str = '/modello/MobiletiWelcome.htm?id=1';
	location.href=str;
}

function navGroup(groupId, catEntryTypeId) {
	navChangeGroupLocation(catEntryTypeId, groupId);
}

function navChangeGroupLocation(t1, t2) {
	var str=""
	str += "group.htm";
	str += "?";
	str += "G2=";
	str += t2;
	location.href=str;
}

function navModelGroup(groupId, catEntryTypeId) {
	navChangeModelGroupLocation(catEntryTypeId, groupId);
}

function navChangeModelGroupLocation(t1, t2) {
	var str=""
	str += "modelgroup.htm";
	str += "?";
	str += "G2=";
	str += t2;
	location.href=str;
}


function navProducts(groupId, catEntryTypeId) {
	navChangeLocation(catEntryTypeId, groupId);
}
function navProduct(catEntryId) {
	var str=""
	str += "product.htm";
	str += "?";
	str += "P1=";
	str += catEntryId;
	location.href=str;
}

function navModels(groupId, catEntryTypeId) {
	navChangeModelsLocation(catEntryTypeId, groupId);
}
function navChangeModelsLocation(t1, t2) {
	var str=""
	str += "models.htm";
	str += "?";
	str += "T1=";
	str += t1;
	str += "&T2=";
	str += t2;
	location.href=str;
}

function navModel(catEntryId) {
	var str=""
	str += "model.htm";
	str += "?";
	str += "P1=";
	str += catEntryId;
	location.href=str;
}

function navProductsBrowse(groupId, catEntryTypeId) {
	var str=""
	str += "browse.htm";
	str += "?";
	str += "T2=";
	str += catEntryTypeId;
	str += "&T1=";
	str += groupId;
	location.href=str;
}

