﻿// PFichas para Argentina

// Borramos las cookies que no sirven ya 
if(typeof(deleteCookie)=='function'){
	deleteCookie('INV_18','');
	deleteCookie('INV_17','');
}

var imagenespia='<img src="/emag_users/commons/set_pfichas.cfm'+location.search;

if(location.search!='') imagenespia+='&'; 
else  imagenespia+='?'; 

if(location.href.indexOf('#')!=-1){
   queryaddword=location.href.split('#')[1];
   imagenespia+=queryaddword+"&";
}

imagenespia+='referencia='+document.referrer.replace(new RegExp('&','gi'), '|');
imagenespia+='&entrada='+location.href.replace(new RegExp('&','gi'), '|');
imagenespia+='" width="0" height="0" style="position:absolute;top:-100px">';


document.write(imagenespia);

// Google Analytics
function urchin(){
	// Codigo analytics España
	analytics_code = "UA-7606902-1";
	_udn="formacion.infojobs.net";
	// Segmento actual
	if(arguments.length){
		uacct=arguments[0];
	}
	else{
		if(typeof(segmentoid)!='undefined'){
			switch (segmentoid){
				case 1:
					uacct='/seg_cursos';
					break;
				case 2:
					uacct='/seg_masters';
					break;
				case 3:
				case 4:
				case 5:
					uacct='/seg_cgratis';
					break;
				case 6:
					uacct='/seg_opos';
					break;
				case 7:
					uacct='/seg_subvenc';
					break;
				case 8:
					uacct='/seg_fp';
					break;
				case 9:
					uacct='/seg_univ';
					break;
				default:
					uacct='/seg_cursos';
			}
		}
		else{
			uacct='/seg_cursos';
		}
	}
	cpoh=document.getElementsByTagName('head')[0];
	urch1=document.createElement('script');
	if (document.location.href.indexOf("https://")==-1){
		urch1.setAttribute('src','http://www.google-analytics.com/urchin.js');
	}else{
		urch1.setAttribute('src','https://ssl.google-analytics.com/urchin.js');	
		
	}	
	cpoh.appendChild(urch1);
	urch2=document.createElement('script');
	urch2.setAttribute('src','/emag_users/commons/js/urchin.cfm?uacct='+uacct+'&analytics_code='+analytics_code+'&v=1.0');
	cpoh.appendChild(urch2);
}

urchin();



