// note popup wird nur beim ersten aufrufen der homepage geoeffnet
function extString( cString, del_1, del_2 ) {
	var sub_1 = cString.split( del_1 );
	if ( sub_1 == cString )
		return -1;
	var substr2 = sub_1[1].split( del_2 );
	var len1 = sub_1[0].length + del_1.length;
	var len2 = substr2[0].length;
	return cString.substring( len1, len1+len2 );
}

function PopUpCheck() {
	
	
	if (document.cookie) {
		newcookie = document.cookie;
		cv = extString( newcookie, 'popup=', ';' );
		if (cv == "-1") {
   			var newcookie = "popup=true; path=\/;";
     			document.cookie = newcookie;
			if(location.pathname.search(/\/xxxcom\//)>-1)
         {
				popUp(rootpath +'/com/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}
			if(location.pathname.search(/\/mx\//)>-1)
         {
				popUp(rootpath +'/mx/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}
			if(location.pathname.search(/\/xxxar\//)>-1)
         {
				popUp(rootpath +'/ar/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}						
       if(location.pathname.search(/\/au\//)>-1)
      {
				popUp(rootpath +'/au/note.jsp','disclaimer','width=470,height=518,scrollbars=auto,top=195,left=170');
			}
       if(location.pathname.search(/\/xxxnl\//)>-1)
      {
			popUp( rootpath +'/nl/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}
       if(location.pathname.search(/\/xxxcom_es\//)>-1)
      {
				popUp(rootpath +'/com_es/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
			}
			  if(location.pathname.search(/\/no\//)>-1)
      {
				popUp(rootpath +'/no/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
			}
			 if(location.pathname.search(/\/xxxgr\//)>-1)
      {
				popUp(rootpath +'/gr/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
			}
			
		}
	} else {
   		var newcookie = "popup=true; path=\/;";
   		document.cookie = newcookie;

		  if(location.pathname.search(/\/com\//)>-1) {
			   popUp(rootpath +'/com/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
		  }
			if(location.pathname.search(/\/mx\//)>-1)
         {
				popUp(rootpath +'/mx/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}
			if(location.pathname.search(/\/xxxxar\//)>-1)
         {
				popUp(rootpath +'/ar/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
			}		

      if(location.pathname.search(/\/au\//)>-1) {
			popUp(rootpath +'/au/note.jsp','disclaimer','width=470,height=518,scrollbars=auto,top=195,left=170');
		}
      if(location.pathname.search(/\/nl\//)>-1) {
			popUp(rootpath +'/nl/note.jsp','disclaimer','width=470,height=470,scrollbars=auto,top=195,left=170');
		}
      if(location.pathname.search(/\/com_es\//)>-1) {
			popUp(rootpath +'/com_es/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
		}
		if(location.pathname.search(/\/no\//)>-1) {
			popUp(rootpath +'/no/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
		}
		if(location.pathname.search(/\/gr\//)>-1) {
			popUp(rootpath +'/gr/note.jsp','disclaimer','width=470,height=510,scrollbars=auto,top=195,left=170');
		}
	}

}

PopUpCheck();

