Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Cube.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Cube.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Cube.h	(revision 96)
@@ -87,37 +87,4 @@
 				 PosX-WidthX -LengthX-ThickX,PosY-WidthY -LengthY-ThickY,PosZ-WidthZ -LengthZ-ThickZ,
 				 PosX-WidthX +LengthX-ThickX,PosY-WidthY +LengthY-ThickY,PosZ-WidthZ +LengthZ-ThickZ);
-/*
-		glBegin (GL_QUADS); 					
-			glVertex3f (PosX+WidthX +LengthX+ThickX,PosY+WidthY +LengthY+ThickY,PosZ+WidthZ +LengthZ+ThickZ);	//+++						
-			glVertex3f (PosX-WidthX +LengthX+ThickX,PosY-WidthY +LengthY+ThickY,PosZ-WidthZ +LengthZ+ThickZ);	//-++
-			glVertex3f (PosX-WidthX -LengthX+ThickX,PosY-WidthY -LengthY+ThickY,PosZ-WidthZ -LengthZ+ThickZ);	//--+
-			glVertex3f (PosX+WidthX -LengthX+ThickX,PosY+WidthY -LengthY+ThickY,PosZ+WidthZ -LengthZ+ThickZ);	//+-+			
-						
-			glVertex3f (PosX+WidthX +LengthX-ThickX,PosY+WidthY +LengthY-ThickY,PosZ+WidthZ +LengthZ-ThickZ);	//++-
-			glVertex3f (PosX+WidthX -LengthX-ThickX,PosY+WidthY -LengthY-ThickY,PosZ+WidthZ -LengthZ-ThickZ);	//+--
-			glVertex3f (PosX-WidthX -LengthX-ThickX,PosY-WidthY -LengthY-ThickY,PosZ-WidthZ -LengthZ-ThickZ);	//---
-			glVertex3f (PosX-WidthX +LengthX-ThickX,PosY-WidthY +LengthY-ThickY,PosZ-WidthZ +LengthZ-ThickZ);	//-+- 
-			
-			glVertex3f (PosX+WidthX +LengthX+ThickX,PosY+WidthY +LengthY+ThickY,PosZ+WidthZ +LengthZ+ThickZ);	//+++ 
-			glVertex3f (PosX+WidthX +LengthX-ThickX,PosY+WidthY +LengthY-ThickY,PosZ+WidthZ +LengthZ-ThickZ);	//++-;
-			glVertex3f (PosX-WidthX +LengthX-ThickX,PosY-WidthY +LengthY-ThickY,PosZ-WidthZ +LengthZ-ThickZ);	//-+- 
-			glVertex3f (PosX-WidthX +LengthX+ThickX,PosY-WidthY +LengthY+ThickY,PosZ-WidthZ +LengthZ+ThickZ);	//-++ 
-			
-			glVertex3f (PosX+WidthX -LengthX+ThickX,PosY+WidthY -LengthY+ThickY,PosZ+WidthZ -LengthZ+ThickZ);	//+-+ 
-			glVertex3f (PosX-WidthX -LengthX+ThickX,PosY-WidthY -LengthY+ThickY,PosZ-WidthZ -LengthZ+ThickZ);	//--+
-			glVertex3f (PosX-WidthX -LengthX-ThickX,PosY-WidthY -LengthY-ThickY,PosZ-WidthZ -LengthZ-ThickZ);	//---
-			glVertex3f (PosX+WidthX -LengthX-ThickX,PosY+WidthY -LengthY-ThickY,PosZ+WidthZ -LengthZ-ThickZ);	//+--
-
-			glVertex3f (PosX+WidthX +LengthX+ThickX,PosY+WidthY +LengthY+ThickY,PosZ+WidthZ +LengthZ+ThickZ);	//+++
-			glVertex3f (PosX+WidthX -LengthX+ThickX,PosY+WidthY -LengthY+ThickY,PosZ+WidthZ -LengthZ+ThickZ);	//+-+
-			glVertex3f (PosX+WidthX -LengthX-ThickX,PosY+WidthY -LengthY-ThickY,PosZ+WidthZ -LengthZ-ThickZ);	//+--
-			glVertex3f (PosX+WidthX +LengthX-ThickX,PosY+WidthY +LengthY-ThickY,PosZ+WidthZ +LengthZ-ThickZ);	//++-			
-
-			glVertex3f (PosX-WidthX +LengthX+ThickX,PosY-WidthY +LengthY+ThickY,PosZ-WidthZ +LengthZ+ThickZ);	//-++			
-			glVertex3f (PosX-WidthX +LengthX-ThickX,PosY-WidthY +LengthY-ThickY,PosZ-WidthZ +LengthZ-ThickZ);	//-+-
-			glVertex3f (PosX-WidthX -LengthX-ThickX,PosY-WidthY -LengthY-ThickY,PosZ-WidthZ -LengthZ-ThickZ);	//---
-			glVertex3f (PosX-WidthX -LengthX+ThickX,PosY-WidthY -LengthY+ThickY,PosZ-WidthZ -LengthZ+ThickZ);	//--+
-		glEnd();
-*/
 	}
 	#endif
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomCube.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomCube.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomCube.h	(revision 96)
@@ -122,37 +122,4 @@
 				 P7X, P7Y, P7Z,
 				 P8X, P8Y, P8Z);
-/*
-		glBegin (GL_QUADS); 			
-			glVertex3f (P1X,P1Y,P1Z);		//+++			
-			glVertex3f (P4X,P4Y,P4Z);		//+-+
-			glVertex3f (P3X,P3Y,P3Z);		//--+
-			glVertex3f (P2X,P2Y,P2Z);		//-++			
-			
-			glVertex3f (P5X,P5Y,P5Z);		//++-
-			glVertex3f (P6X,P6Y,P6Z);		//-+- 
-			glVertex3f (P7X,P7Y,P7Z);		//---
-			glVertex3f (P8X,P8Y,P8Z);		//+--
-
-			glVertex3f (P1X,P1Y,P1Z);		//+++ 
-			glVertex3f (P2X,P2Y,P2Z);		//-++ 
-			glVertex3f (P6X,P6Y,P6Z);		//-+- 
-			glVertex3f (P5X,P5Y,P5Z);		//++-
-
-			glVertex3f (P4X,P4Y,P4Z);		//+-+ 			
-			glVertex3f (P8X,P8Y,P8Z);		//+--
-			glVertex3f (P7X,P7Y,P7Z);		//---
-			glVertex3f (P3X,P3Y,P3Z);		//--+
-
-			glVertex3f (P1X,P1Y,P1Z);		//+++
-			glVertex3f (P5X,P5Y,P5Z);		//++-
-			glVertex3f (P8X,P8Y,P8Z); 		//+--
-			glVertex3f (P4X,P4Y,P4Z);		//+-+
-
-			glVertex3f (P2X,P2Y,P2Z);		//-++
-			glVertex3f (P3X,P3Y,P3Z);		//--+
-			glVertex3f (P7X,P7Y,P7Z);		//---
-			glVertex3f (P6X,P6Y,P6Z);		//-+-			
-		glEnd(); 		
-*/
 	}
 	#endif
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomSurface.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomSurface.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_CustomSurface.h	(revision 96)
@@ -77,9 +77,19 @@
 		glLoadName( detId_ );
 
-		glBegin (GL_QUADS); 			
+		glBegin (GL_QUADS); 	
+			SetNormal  (P1X, P1Y, P1Z,
+						P2X, P2Y, P2Z,
+						P3X, P3Y, P3Z);
+
 			glVertex3f (P1X, P1Y, P1Z);	// FIRST FACE
 			glVertex3f (P2X, P2Y, P2Z);
 			glVertex3f (P3X, P3Y, P3Z);
 			glVertex3f (P4X, P4Y, P4Z);
+
+
+
+			SetNormal  (P1X, P1Y, P1Z,
+						P4X, P4Y, P4Z,
+						P3X, P3Y, P3Z);
 
 			glVertex3f (P1X, P1Y, P1Z);	// SECOND FACE
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Disc.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Disc.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Disc.h	(revision 96)
@@ -70,16 +70,20 @@
 		double dphi  = 6.283185307179586476925286766559 /NPhi;
 		double D     = sqrt(DirX*DirX+DirY*DirY+DirZ*DirZ);
-				
-		glPushMatrix();
-		glTranslatef(PosX,PosY,PosZ);
-		glRotatef(57.29*acos(DirX/D),1,0,0);
-		glRotatef(57.29*acos(DirY/D),0,1,0);
-		glRotatef(57.29*acos(DirZ/D),0,0,1);
+		
+		double rotTheta = 57.29*asin(DirY/D);
+		double rotPhi   = 57.29*asin(DirX/sqrt(DirX*DirX+DirZ*DirZ));
+			
+		glPushMatrix();		
+		glTranslatef(PosX,PosY,PosZ);		
+		glRotatef(rotPhi  ,0,1,0);
+		glRotatef(rotTheta,1,0,0);
 		glBegin (GL_TRIANGLES); 			
 			for(double phi=0; phi<=6.2831;phi+=dphi){			
+				glNormal3f (0                    ,0                     ,1); 
 				glVertex3f (Radius*cos(phi)		 ,Radius*sin(phi)		,0);	// FIRST FACE
 				glVertex3f (Radius*cos(phi+dphi) ,Radius*sin(phi+dphi)	,0);
 				glVertex3f (0					 ,0						,0);
 
+				glNormal3f (0                    ,0                     ,-1); 
 				glVertex3f (Radius*cos(phi+dphi) ,Radius*sin(phi+dphi)	,0);	// SECOND FACE
 				glVertex3f (Radius*cos(phi)		 ,Radius*sin(phi)		,0);
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_PartialSphere.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_PartialSphere.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_PartialSphere.h	(revision 96)
@@ -87,4 +87,5 @@
 			for(double the=Theta1; the<=Theta2-dthe;the+=dthe){
 			for(double phi=Phi1;   phi<=Phi2  -dphi;phi+=dphi){			
+				glNormal3f (       cos(the)*cos(phi)			,       cos(the)*sin(phi)			 ,       sin(the));
 				glVertex3f (Radius*cos(the)*cos(phi)			,Radius*cos(the)*sin(phi)			 ,Radius*sin(the));		// OUTER FACE
 				glVertex3f (Radius*cos(the)*cos(phi+dphi)		,Radius*cos(the)*sin(phi+dphi)		 ,Radius*sin(the)); 
@@ -92,4 +93,5 @@
 				glVertex3f (Radius*cos(the+dthe)*cos(phi)		,Radius*cos(the+dthe)*sin(phi)		 ,Radius*sin(the+dthe));
 
+				glNormal3f (      -cos(the)*cos(phi)			,      -cos(the)*sin(phi)			 ,      -sin(the));
 				glVertex3f (Radius*cos(the)*cos(phi)			,Radius*cos(the)*sin(phi)			 ,Radius*sin(the));		// INNER FACE
 				glVertex3f (Radius*cos(the+dthe)*cos(phi)		,Radius*cos(the+dthe)*sin(phi)		 ,Radius*sin(the+dthe)); 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Rectangle.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Rectangle.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Rectangle.h	(revision 96)
@@ -3,4 +3,5 @@
 
 #include "FROG_Element_Base.h"
+#include "FROG_Primitives.h"
 
 class FROG_Element_Primitive_Rectangle : public FROG_Element_Base_With_DetId {
@@ -67,12 +68,24 @@
         if(color){glColor4fv(color);}else{glColor4fv(style_->color_);}
 		glLoadName( detId_ );
+
 		
-		glBegin (GL_QUADS); 		
-			glVertex3f (PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ);	//+++	// FIRST FACE
+		
+		glBegin (GL_QUADS); 	
+			SetNormal(	PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ,				// FIRST FACE
+						PosX-WidthX +LengthX,PosY-WidthY +LengthY,PosZ-WidthZ +LengthZ,
+						PosX-WidthX -LengthX,PosY-WidthY -LengthY,PosZ-WidthZ -LengthZ);
+
+			glVertex3f (PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ);	//+++	
 			glVertex3f (PosX-WidthX +LengthX,PosY-WidthY +LengthY,PosZ-WidthZ +LengthZ);	//-++
 			glVertex3f (PosX-WidthX -LengthX,PosY-WidthY -LengthY,PosZ-WidthZ -LengthZ);	//--+
 			glVertex3f (PosX+WidthX -LengthX,PosY+WidthY -LengthY,PosZ+WidthZ -LengthZ);	//+-+
 
-			glVertex3f (PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ);	//+++	// SECOND FACE
+
+
+			SetNormal(	PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ,				// SECOND FACE
+						PosX+WidthX -LengthX,PosY+WidthY -LengthY,PosZ+WidthZ -LengthZ,
+						PosX-WidthX -LengthX,PosY-WidthY -LengthY,PosZ-WidthZ -LengthZ);
+
+			glVertex3f (PosX+WidthX +LengthX,PosY+WidthY +LengthY,PosZ+WidthZ +LengthZ);	//+++	
 			glVertex3f (PosX+WidthX -LengthX,PosY+WidthY -LengthY,PosZ+WidthZ -LengthZ);	//+-+
 			glVertex3f (PosX-WidthX -LengthX,PosY-WidthY -LengthY,PosZ-WidthZ -LengthZ);	//--+
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Sphere.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Sphere.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Element_Primitive_Sphere.h	(revision 96)
@@ -63,12 +63,17 @@
 		double dphi =	6.283185307179586476925286766559 /NPhi;
 		double dthe =	3.1415926535897932384626433832795/NTheta;
+
+		glPushMatrix();		
+		glTranslatef(PosX,PosY,PosZ);		
 		glBegin (GL_QUADS); 
 			for(double the=0; the<=2*3.1416-dthe;the+=dthe){
-			for(double phi=0; phi<=6.2831;phi+=dphi){								
-				glVertex3f (PosX+Radius*cos(the)*cos(phi)			,PosY+Radius*cos(the)*sin(phi)			 ,PosZ+Radius*sin(the)); 
-				glVertex3f (PosX+Radius*cos(the+dthe)*cos(phi)		,PosY+Radius*cos(the+dthe)*sin(phi)		 ,PosZ+Radius*sin(the+dthe));
-				glVertex3f (PosX+Radius*cos(the+dthe)*cos(phi+dphi) ,PosY+Radius*cos(the+dthe)*sin(phi+dphi) ,PosZ+Radius*sin(the+dthe)); 
-				glVertex3f (PosX+Radius*cos(the)*cos(phi+dphi)		,PosY+Radius*cos(the)*sin(phi+dphi)		 ,PosZ+Radius*sin(the)); 											}}		
+			for(double phi=0; phi<=6.2831;phi+=dphi){	
+				glNormal3f (       cos(the)*cos(phi)			,       cos(the)*sin(phi)			 ,       sin(the));
+				glVertex3f (Radius*cos(the)*cos(phi)			,Radius*cos(the)*sin(phi)			 ,Radius*sin(the)); 
+				glVertex3f (Radius*cos(the+dthe)*cos(phi)		,Radius*cos(the+dthe)*sin(phi)		 ,Radius*sin(the+dthe));
+				glVertex3f (Radius*cos(the+dthe)*cos(phi+dphi)  ,Radius*cos(the+dthe)*sin(phi+dphi)  ,Radius*sin(the+dthe)); 
+				glVertex3f (Radius*cos(the)*cos(phi+dphi)		,Radius*cos(the)*sin(phi+dphi)		 ,Radius*sin(the)); 											}}		
 		glEnd(); 
+		glPopMatrix();
 	}
 	#endif
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Events.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Events.cpp	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Events.cpp	(revision 96)
@@ -9,7 +9,52 @@
 }
 
-void FROG_Events::Load (const char* path)
-{
-	if(frogObjects_ && frogObjects_->frogEvent_){	
+void FROG_Events::Load(){	
+	FilesPath_.clear();
+	FilesPath_   = frogObjects_->frogCard_->GetStringVector("InputVisFile");
+	int FileToLoad = 0;
+
+	Load(FileToLoad);
+}
+
+void FROG_Events::Load(std::vector<string>& inputFiles){		
+	if(!frogObjects_->frogCard_->IsTagPresent("InputVisFile") && inputFiles.size()==0){
+		printf("No input files have been given (either from the config card or from the command line\n");
+		return;
+	}
+
+	std::vector<string> cardFiles = frogObjects_->frogCard_->GetStringVector("InputVisFile");
+
+	FilesPath_.clear();
+	for(unsigned int i=0;i<inputFiles.size();i++){		FilesPath_.push_back(inputFiles[i]);}
+	for(unsigned int i=0;i<cardFiles .size();i++){		FilesPath_.push_back(cardFiles [i]);}
+	int FileToLoad = 0;
+
+	int temp;
+	frogObjects_->frogCard_->GetInt  (&temp, "Event_Number");
+	if(temp<0){
+		FileToLoad = FilesPath_.size() -1;
+	}
+
+	for(unsigned int i=0;i<FilesPath_.size();i++){
+		printf("File %i  = %s\n",i,FilesPath_[i].c_str());
+	}
+
+	Load(FileToLoad);
+}
+
+void FROG_Events::Load(const char* path){
+	FilesPath_.clear();
+	FilesPath_.push_back(path);
+	int FileToLoad = 0;
+
+	Load(FileToLoad);
+}
+
+void FROG_Events::Load (int CurrentFile){
+	if(CurrentFile>=(int)FilesPath_.size())return;
+	if(CurrentFile == CurrentFile_)   return;
+	CurrentFile_ = CurrentFile;
+
+	if(frogObjects_ && frogObjects_->frogEvent_){
 		frogObjects_->frogEvent_->uninit();
 		frogObjects_->frogEvent_->deleteDaughters();
@@ -17,10 +62,11 @@
 	}
 	if(prim){ delete prim; prim=NULL;}
-
-	FilePath_ = path;
-
-	FILE* pFile = fopen(FilePath_,"rb" );
+	
+	const char* globalpath = (char*) DownLoadFile( (char*)FilesPath_[CurrentFile].c_str(), frogObjects_->frogCard_->mAbsolutePath.c_str() );
+	if(FROG_PATH::IsFileExist(globalpath)){FilesPath_[CurrentFile] = string(globalpath);}	
+	
+	FILE* pFile = fopen(globalpath,"rb" );
 	if(pFile==NULL){
-		printf("The file %s can not be opened !\n",FilePath_);
+		printf("The file %s can not be opened !\n",globalpath);
 		if(prim){ delete prim; prim=NULL;}
 		return;
@@ -39,5 +85,5 @@
 			//evt->FillMap();
 		}
-	}
+	}	
 }
 
@@ -56,10 +102,10 @@
 
 	#ifdef FROG_ZLIB
-		if(CompressFiles){
-			char* path2 = new char[strlen(path)];
-			strcpy(path2,path);
-			FROG_ZLIB_Deflate(path2);
-			delete path2;
-		}
+	if(CompressFiles){
+		char* path2 = new char[strlen(path)];
+		strcpy(path2,path);
+		FROG_ZLIB_Deflate(path2);
+		delete path2;
+	}
 	#endif
 }
@@ -72,5 +118,4 @@
 	FILE* pFile;
 	if(CurrentSize_==0){				
-		//pFile = fopen("InLive.vis","wb");
 		pFile = fopen(path,"wb");
 		unsigned short prim_type = prim->type();
@@ -94,5 +139,4 @@
 		prim->deleteDaughters();		
 	}else{
-		//pFile = fopen("InLive.vis","ab+" );
 		pFile = fopen(path,"ab+" );
 		fseek(pFile,CurrentSize_,SEEK_SET);
@@ -107,5 +151,4 @@
 				if(CurrentSize_ + dau->size()>=MaxSize){
 					MaxFileHasBeenReached=true;
-//					for(unsigned j=0;j<i;j++){prim->deleteDaughter(i);}
 				}
 				if(MaxFileHasBeenReached)continue;
@@ -124,5 +167,4 @@
 	fclose(pFile);	
 
-	//pFile = fopen("InLive.vis","rb+" );
 	pFile = fopen(path,"rb+" );
 		fseek(pFile,2,SEEK_SET);
@@ -154,26 +196,31 @@
 FROG_Element_Event* FROG_Events::GoToEvent(int i)
 {
+	if(CurrentFile_< 0)return NULL;
+	if(CurrentFile_>=(int)FilesPath_.size())return NULL;
+
 	if(frogObjects_->frogEvent_){			
 		frogObjects_->frogEvent_->uninit();
 		frogObjects_->frogEvent_->deleteDaughters();
-	}
-
-	if(i<0 || (prim && i>=(int)prim->getDaughterSize())){		
-		Load(FilePath_);
+	}	
+
+	if(i<0 || (prim && i>=(int)prim->getDaughterSize())){				
+		CurrentFile_ = -1;		
+		Load(FilesPath_.size()-1);
 		if(prim)Current_Event = prim->getDaughterSize()-1; 
-	}else{
+	}else{		
 		Current_Event=i;	
-	}
+	}	
 
 	if(!prim)return NULL;
 	frogObjects_->setEvent(dynamic_cast<FROG_Element_Event*>(prim->getDaughter(Current_Event)));
 
-	FILE* pFile = fopen(FilePath_,"rb" );
-		if(pFile==NULL){
-			printf("The file %s can not be opened !\n",FilePath_);
-			return NULL;
-		}
-		fseek (pFile,((FROG_Element_Event*)frogObjects_->frogEvent_)->EventPosInFile(),SEEK_SET);
-		FROG_ELEMENT::Read(pFile,frogObjects_->frogEvent_,((FROG_Element_Event*)frogObjects_->frogEvent_)->EventNBytesToRead());			
+	FILE* pFile = fopen(FilesPath_[CurrentFile_].c_str(),"rb" );	
+	if(pFile==NULL){
+		printf("The file %s can not be opened !\n",FilesPath_[CurrentFile_].c_str());
+		return NULL;
+	}
+	
+	fseek (pFile,((FROG_Element_Event*)frogObjects_->frogEvent_)->EventPosInFile(),SEEK_SET);
+	FROG_ELEMENT::Read(pFile,frogObjects_->frogEvent_,((FROG_Element_Event*)frogObjects_->frogEvent_)->EventNBytesToRead());			
 	fclose(pFile);
 
@@ -185,4 +232,5 @@
 	return frogObjects_->frogEvent_;
 }
+
 FROG_Element_Event* FROG_Events::NextEvent()
 {
@@ -190,9 +238,10 @@
 	if(Current_Event+1<prim->getDaughterSize()){	Current_Event++;
 	}else{
-		Load(FilePath_);
-		if(Current_Event+1<prim->getDaughterSize()){Current_Event++;}else{Current_Event=0;}
-	}
-	return GoToEvent(Current_Event);	 
-}
+		Load(CurrentFile_);
+		if(Current_Event+1<prim->getDaughterSize()){Current_Event++;}else{NextFile();Current_Event=0;}
+	}
+	return GoToEvent(Current_Event);
+}
+
 FROG_Element_Event* FROG_Events::PreviousEvent()
 {
@@ -200,5 +249,5 @@
 	if(Current_Event!=0){	Current_Event--;	
 	}else{
-		Load(FilePath_);
+		PreviousFile();
 		Current_Event = prim->getDaughterSize()-1; 
 	}
@@ -206,8 +255,33 @@
 }
 
-void FROG_Events::Init(FROG_Objects_Extended* frogObjects)
-{
-	if(!prim)return;
-	frogObjects_ = frogObjects;
+void FROG_Events::NextFile(){
+	if(FilesPath_.size()<=1)return;
+
+	CurrentFile_++;
+	if(CurrentFile_>=(int)FilesPath_.size()){
+		CurrentFile_=0;
+	}
+
+	Load(CurrentFile_);
+}
+
+void FROG_Events::PreviousFile(){
+	if(FilesPath_.size()<=1)return;
+
+	if(CurrentFile_>0){
+		CurrentFile_--;
+	}else{
+		CurrentFile_ = FilesPath_.size() - 1;
+	}
+	Load(CurrentFile_);
+}
+
+const char* FROG_Events::CurrentFile(){
+	if(CurrentFile_>=(int)FilesPath_.size())return "NoFiles!!!";
+
+	if(FilesPath_[CurrentFile_].size()>60){		
+		return FilesPath_[CurrentFile_].c_str()+(FilesPath_[CurrentFile_].size()-60);
+	}
+	return FilesPath_[CurrentFile_].c_str();
 }
 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Events.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Events.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Events.h	(revision 96)
@@ -17,4 +17,5 @@
 #include "FROG_Element_Event.h"
 #include "FROG_Objects_Extended.h"
+#include "FROG_Net_Tools.h"
 
 #ifdef FROG_ZLIB
@@ -32,8 +33,9 @@
 	std::vector<unsigned int> OpenedMenu;
 private :
-	const char*  FilePath_;
+	std::vector<string>  FilesPath_;
+			 int CurrentFile_;
 	unsigned int CurrentSize_;
 public:
-	FROG_Events() : prim(NULL),frogObjects_(NULL), Current_Event(0),FilePath_(NULL), CurrentSize_(0){
+	FROG_Events(FROG_Objects_Extended* frogObjects=NULL) : prim(NULL),frogObjects_(frogObjects), Current_Event(0), CurrentFile_(-1), CurrentSize_(0){
 		prim = new FROG_Element_Base(C_PRIMARY);
 
@@ -43,5 +45,9 @@
 	void AddEvent(FROG_Element_Event* event);
 
+	void Load ();
+	void Load (std::vector<string>& FilesFromCard);
 	void Load (const char* path);
+	void Load (int CurrentFile);
+
 	void Save (const char* path);	
 	bool SaveInLive (const char* path, bool CloseFile=false, bool CompressFiles=true, unsigned int MaxSize=(unsigned int)-1);
@@ -52,4 +58,8 @@
     FROG_Element_Event* PreviousEvent();
 
+    void NextFile();
+    void PreviousFile();
+	const char* CurrentFile();
+
     FROG_Element_Event* getCurrentEvent() const {
 		if( Current_Event<prim->getDaughterSize() )
@@ -59,5 +69,4 @@
 
     int NumberOfEvents() const { return prim->getDaughterSize(); }
-	void Init(FROG_Objects_Extended* frogObjects);
 
 	void keepEventToDisplay(FROG_Element_Base* mother);
@@ -68,6 +77,4 @@
 	void keepOpenedMenu(FROG_Element_Base* mother);
 	void updateOpenedMenu();
-
-
 };
 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Net.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Net.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Net.h	(revision 96)
@@ -3,8 +3,8 @@
 #define _FROG_NET_H__
 
-#include "../CURL/curl.h"
 #include <stdio.h>
 #include <iostream>
 
+#include "../CURL/curl.h"
 class FROG_Net {
 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.cpp	(revision 96)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.cpp	(revision 96)
@@ -0,0 +1,122 @@
+#include "FROG_Net_Tools.h"
+
+using namespace std;
+
+bool GetPathFromURL(char* dest, char* inputFile, unsigned int sizeMax, const char* AbsolutePath=NULL)
+{
+	std::string result((char*)inputFile);
+	bool toReturn = false;
+
+	// check if inputVisFile contains http:// or ftp://
+	string::size_type loc  = result.find( "http://", 0 );
+	string::size_type loc2 = result.find( "ftp://", 0 );		   
+
+	if( loc != string::npos || loc2 != string::npos) {
+		 int End = result.rfind('/');			 
+
+		 string local     = result.substr(End+1,result.size());
+		 string localPath = string("Files/") + local;		 
+		 if(AbsolutePath){			
+			 result    = string(AbsolutePath) + localPath;
+		 }else{
+			 result    = localPath;
+		 }
+
+		 #ifdef FROG_CURL
+		 toReturn  = true;		 
+		 #endif
+	}else{		
+		if(FROG_PATH::IsFileExist(inputFile)){
+			result = string(inputFile);
+		}else{
+			string tempory = string(inputFile);
+			if(AbsolutePath && tempory.find(AbsolutePath)==string::npos){
+				result = string(AbsolutePath) + string(inputFile);
+			}
+		}
+	}
+
+	if(result.size()>sizeMax){
+		printf("GetPathFromURL : sizeMax is smaller than the actual string size\n");
+	}else{
+		strcpy(dest,result.c_str());
+	}
+
+	return toReturn;		  
+}
+
+bool IsExpectedFileSize(char* fileName){
+	FILE* FileExist = fopen(fileName,"rb");
+	if(!FileExist)return false;
+
+	fseek(FileExist,0,SEEK_SET);
+	unsigned short chunk_type     = 0;
+	unsigned int   chunk_size     = 0;
+	fread(&chunk_type, 1, sizeof(unsigned short), FileExist);
+	fread(&chunk_size, 1, sizeof(unsigned int)  , FileExist);
+	fseek(FileExist,0,SEEK_END);
+	if( (long int)(chunk_size) > ftell(FileExist) ){
+		fclose(FileExist);
+		return false;
+	}	
+	fclose(FileExist);
+	return true;
+}
+
+void* DownLoadFile(void* inputFile,const char* AbsolutePath=NULL)
+{
+	char* localPath = new char[2048];
+	bool IsURL = GetPathFromURL(localPath,(char*)inputFile,2048,AbsolutePath);
+	
+	if(IsURL){		
+		#ifdef FROG_CURL	
+		char local[2048];
+		strcpy(local,localPath+6);
+
+		//Check if unzipped file (or file, in case of not .gz extension) exist
+//		if(!FROG_ZLIB_IsUnZippedFileExist(localPath) || (FROG_ZLIB_IsUnZippedFileExist(localPath) && !CheckFileSize(FileExist)) ){
+		if(!FROG_ZLIB_IsUnZippedFileExist(localPath) || (!FROG_ZLIB_IsGZip(localPath) && !IsExpectedFileSize(localPath)) ){			
+			printf("Downloading %s to %s\n",(char*)inputFile, local);
+			printf("This can take few seconds\n");
+			FROG_Net net;
+			net.connect((char*)inputFile);
+			net.write(localPath);
+			net.close();
+		}else{
+			printf("Loading %s\n",localPath);
+		}		
+		#endif
+	}else{		
+		printf("Loading %s\n",localPath);
+	}	
+	
+
+	if(FROG_ZLIB_IsGZip(localPath)){
+		FROG_ZLIB_Inflate(localPath);
+	}
+
+	if(!IsExpectedFileSize(localPath) ){
+		printf("The (down)loaded File is corrupted\nThis list can help you to find out the problem : \n");
+		printf("\t- The .vis file doesn't exist yet\n");
+		printf("\t- Bug During the Download! : Clean up the directory File/ of all the .vis file\n");
+		printf("\t- Strong firewall : Download the file by yourself and copy it in the File/ repository\n");
+		printf("\t- NoIdea : Go on the FROG website http://projects.hepforge.org/frog/\n");
+		printf("\t  Download the latest FROG version and/or ask help on the mailing list\n");
+		//exit(0);
+	}
+
+	return localPath;		  
+}
+
+
+/*
+#ifdef windows
+	DWORD WINAPI WinDownLoadFile( LPVOID lpParam ) {
+		// interface for windows
+		char* fileName_ = (char*)lpParam;
+		DownLoadFile(fileName_);
+		return 0;
+	}
+#endif
+*/
+
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Net_Tools.h	(revision 96)
@@ -6,102 +6,20 @@
 #include <iostream>
 
+#include "FROG_ZLib.h"
+#include "FROG_Path.h"
+
+#ifdef FROG_CURL
 #include "FROG_Net.h"
-#include "FROG_ZLib.h"
-
-bool GetPathFromURL(char* dest, char* inputFile, unsigned int sizeMax)
-{
-	std::string result((char*)inputFile);
-	bool toReturn = false;
-
-	// check if inputVisFile contains http:// or ftp://
-	string::size_type loc  = result.find( "http://", 0 );
-	string::size_type loc2 = result.find( "ftp://", 0 );		   
-
-	if( loc != string::npos || loc2 != string::npos) {
-		 int End = result.rfind('/');			 
-
-		 string local     = result.substr(End+1,result.size());
-		 string localPath = string("Files/") + local;		 
-		 result           = localPath;		 
-		 toReturn         = true;
-	}
-
-	if(result.size()>sizeMax){
-		printf("GetPathFromURL : sizeMax is smaller than the actual string size\n");
-	}else{
-		strcpy(dest,result.c_str());
-	}
-
-	return toReturn;		  
-}
-
-bool IsExpectedFileSize(char* fileName){
-	FILE* FileExist = fopen(fileName,"rb");
-	if(!FileExist)return false;
-
-	fseek(FileExist,0,SEEK_SET);
-	unsigned short chunk_type     = 0;
-	unsigned int   chunk_size     = 0;
-	fread(&chunk_type, 1, sizeof(unsigned short), FileExist);
-	fread(&chunk_size, 1, sizeof(unsigned int)  , FileExist);
-	fseek(FileExist,0,SEEK_END);
-	if( (long int)(chunk_size) > ftell(FileExist) ){
-		fclose(FileExist);
-		return false;
-	}	
-	fclose(FileExist);
-	return true;
-}
-
-void* DownLoadFile(void* inputFile){
-
-	char* localPath = new char[2048];
-	bool IsURL = GetPathFromURL(localPath,(char*)inputFile,2048);
-
-	if(IsURL) {
-		char local[2048];
-		strcpy(local,localPath+6);
-
-		//Check if unzipped file (or file, in case of not .gz extension) exist
-//		if(!FROG_ZLIB_IsUnZippedFileExist(localPath) || (FROG_ZLIB_IsUnZippedFileExist(localPath) && !CheckFileSize(FileExist)) ){
-		if(!FROG_ZLIB_IsUnZippedFileExist(localPath) || (!FROG_ZLIB_IsGZip(localPath) && !IsExpectedFileSize(localPath)) ){
-			printf("Loading %s from %s\n",local,(char*)inputFile);
-			printf("This can take few seconds\n");
-			FROG_Net net;
-			net.connect((char*)inputFile);
-			net.write(localPath);
-			net.close();
-		}
-	}
-
-	if(FROG_ZLIB_IsGZip(localPath)){
-		FROG_ZLIB_Inflate(localPath);
-	}
-
-	if(!IsExpectedFileSize(localPath) ){
-		printf("The downloaded File is corrupted\nAre you sure of the quality of the transfert?\n");
-		printf("- The .vis file doesn't exist yet\n");
-		printf("- Bug During the Download! : Clean up the directory File/ of all the .vis file\n");
-		printf("- Strong firewall : Download the file by yourself and copy it in the File/ repository\n");
-		printf("- NoIdea : Go on the FROG website http://projects.hepforge.org/frog/\n");
-		printf("  Download the latest FROG version and/or ask help on the mailing list\n");
-		//exit(0);
-	}
+#endif
 
 
-	return localPath;		  
-}
 
+bool  GetPathFromURL(char* dest, char* inputFile, unsigned int sizeMax, const char* AbsolutePath);
+bool  IsExpectedFileSize(char* fileName);
+void* DownLoadFile(void* inputFile,const char* AbsolutePath);
 
-#ifdef linux
-#elif macos
-#else
-DWORD WINAPI WinDownLoadFile( LPVOID lpParam ) {
-	// interface for windows
-    char* fileName_ = (char*)lpParam;
-	DownLoadFile(fileName_);
-	return 0;
-}
-#endif
+//#ifdef windows
+//	DWORD WINAPI WinDownLoadFile( LPVOID lpParam );
+//#endif
 
 #endif
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Objects_Extended.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Objects_Extended.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Objects_Extended.h	(revision 96)
@@ -6,4 +6,5 @@
 #define _FROG_OBJECTS_EXTENDED_H__
 
+#include "FROG_Path.h"
 #include "FROG_Objects.h"
 #include "FROG_Element_Event.h"
@@ -71,11 +72,11 @@
 #ifdef FROG_OPENGL
    void loadMarkers(){
-		char Path[255];
+		char LocalPath[2048];
+		char AbsolPath[2048];
 		for(unsigned int i=1;i<200;i++){
-		   sprintf(Path,"Resources/Marker/%i.png",i);
-		   FILE* file_exist = fopen(Path,"r");
-		   if(file_exist){
-				unsigned int tmp = 0;
-				LoadTexture(&tmp,Path,true);
+		   sprintf(LocalPath,"Resources/Marker/%i.png",i);
+		   if(FROG_PATH::CheckGlobalPath(LocalPath,frogCard_->mAbsolutePath.c_str(),AbsolPath)){
+				unsigned int tmp = 0;				
+				LoadTexture(&tmp,AbsolPath,true);
 				Marker[i] = tmp;
 		   }else{
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Path.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Path.cpp	(revision 96)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Path.cpp	(revision 96)
@@ -0,0 +1,56 @@
+#include "FROG_Path.h"
+
+namespace FROG_PATH{
+
+	bool IsFileExist(const char* path){
+		FILE* FileExist = fopen(path,"r");
+		if(FileExist){
+			fclose(FileExist);
+			return true;
+		}
+		return false;
+	}
+
+
+	bool CheckGlobalPath(const char* LocalPath, const char* ExeAbsolutePath, char* ResultPath=NULL){
+		FILE* FileExist = fopen(LocalPath,"r");
+		if(FileExist){
+			fclose(FileExist);
+			if(ResultPath)sprintf(ResultPath,"%s",LocalPath);
+			//printf("FROGPATH %s ",LocalPath);
+			return true;
+		}else{
+			char temp[2048];
+			sprintf(temp,"%s%s",ExeAbsolutePath,LocalPath);
+			FILE* FileExist = fopen(temp,"r");
+			if(FileExist){			
+				fclose(FileExist);
+				if(ResultPath)strcpy(ResultPath,temp);
+				//printf("FROGPATH %s ",temp);
+				return true;
+			}
+		}
+		return false;		
+	}
+
+	std::string GetGlobalPath(const char* LocalPath, const char* ExeAbsolutePath){
+		FILE* FileExist = fopen(LocalPath,"r");
+		if(FileExist){
+			fclose(FileExist);
+			return std::string(LocalPath);
+		}else{
+			char temp[2048];
+			sprintf(temp,"%s%s",ExeAbsolutePath,LocalPath);
+			FILE* FileExist = fopen(temp,"r");
+			if(FileExist){			
+				fclose(FileExist);
+				return std::string(temp);
+			}else{
+			  //printf("File %s Do not exist\n",temp);
+			}
+		}
+		return std::string("");		
+	}
+
+}
+
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Path.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Path.h	(revision 96)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Path.h	(revision 96)
@@ -0,0 +1,17 @@
+
+#ifndef _FROG_PATH_H__
+#define _FROG_PATH_H__
+
+#include <iostream>
+#include <string>
+
+namespace FROG_PATH{
+
+	bool		IsFileExist		(const char* path);
+	bool		CheckGlobalPath	(const char* LocalPath, const char* ExeAbsolutePath, char* ResultPath);
+	std::string GetGlobalPath	(const char* LocalPath, const char* ExeAbsolutePath);
+}
+
+#endif
+
+
Index: trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.cpp	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.cpp	(revision 96)
@@ -14,4 +14,37 @@
 #include "FROG_ReadCards.h"
 
+// repalce the std getline method,
+// in order to be LINUX/MACOS/WINDOWS compatible
+// Because those systems have different end line convention
+istream& FROG_ReadCards::getLine(istream& is, string& buffer){
+        char ch, peekch;
+        char LF = '\n';
+        char CR = '\r';
+        is.get(ch);
+
+//        string buffer;
+		buffer.clear();
+
+        while(!is.eof() && ch != LF && ch != CR){
+                buffer.append(1, ch);
+                is.get(ch);
+        }
+        
+        if (is.eof()){
+                return is;
+        }
+        
+        peekch = is.peek();
+
+		if(ch == CR && peekch == LF){ // CR/LF is windows otherwise Mac        
+                is.get();
+		}else if(peekch == CR){        // allow for improbable LF/CR        
+                is.get();
+        }
+
+        return is;
+}
+
+
 // remove comments and whitespace
 void FROG_ReadCards::clean() {
@@ -22,5 +55,6 @@
   while ( !mFile.eof() ) {    
 
-	getline(mFile,line,'\n');
+	  getLine(mFile,line);
+	//getline(mFile,line,'\n');
 	//printf("%s\n",line.c_str());
 
@@ -88,13 +122,14 @@
 			// check that the file is not already in the list
 			bool alreadyIn = false;
-			for(unsigned int a=0;a<mFilesToRead.size();a++){
-				if(strcmp(mFilesToRead[a],values[z].c_str())==0)
+		    char* FilePath = new char[2048];
+			FROG_PATH::CheckGlobalPath(values[z].c_str(),mAbsolutePath.c_str(),FilePath);	  		
+			for(unsigned int a=0;a<mFilesToRead.size()&&!alreadyIn;a++){
+				if(strcmp(mFilesToRead[a],FilePath)==0)
 					alreadyIn=true;
 			}
 			if(!alreadyIn){
-			   char* tmp = new char[255];
-			   sprintf(tmp,"%s",values[z].c_str());
-			   mFilesToRead.push_back(tmp);			
+			   mFilesToRead.push_back(FilePath);			
 			}
+
 		}
 	}else{
@@ -116,5 +151,7 @@
 void FROG_ReadCards::Construct(const char* filename) {
 
-	mFilesToRead.push_back(filename);
+	  char* FilePath = new char[2048];
+	  FROG_PATH::CheckGlobalPath(filename,mAbsolutePath.c_str(),FilePath);	  		
+	  mFilesToRead.push_back(FilePath);
 
       for(unsigned int i = 0;i<mFilesToRead.size();i++){
@@ -405,4 +442,5 @@
 }
 
+
 std::string FROG_ReadCards::GetString(const char* format, ...){
 	char tag[255];
Index: trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_ReadCards.h	(revision 96)
@@ -12,5 +12,12 @@
 using namespace std;
 
-#ifdef linux
+#include "FROG_Path.h"
+
+#ifdef windows
+  #include <hash_map>
+ using namespace stdext;
+ typedef hash_map<std::string, std::vector< std::string >, hash_compare<std::string, std::less<std::string> > > Values;
+ typedef hash_map<std::string, std::vector< std::string >, hash_compare<std::string, std::less<std::string> > >::iterator Values_Iterator;
+#else
  #include <ext/hash_map>
  using namespace __gnu_cxx;
@@ -24,21 +31,4 @@
  typedef hash_map<std::string, std::vector< std::string >, hash<std::string>, equal_to<std::string> > Values;
  typedef hash_map<std::string, std::vector< std::string >, hash<std::string>, equal_to<std::string> >::iterator Values_Iterator;
-#elif macos
- #include <ext/hash_map>
- using namespace __gnu_cxx;
-
- namespace __gnu_cxx {
-        template<> struct hash< std::string >{
-                size_t operator()( const std::string& x ) const{ return hash< const char* >()( x.c_str() );  }
-        };
- }
-
- typedef hash_map<std::string, std::vector< std::string >, hash<std::string>, equal_to<std::string> > Values;
- typedef hash_map<std::string, std::vector< std::string >, hash<std::string>, equal_to<std::string> >::iterator Values_Iterator;
-#else 
- #include <hash_map>
- using namespace stdext;
- typedef hash_map<std::string, std::vector< std::string >, hash_compare<std::string, std::less<std::string> > > Values;
- typedef hash_map<std::string, std::vector< std::string >, hash_compare<std::string, std::less<std::string> > >::iterator Values_Iterator;
 #endif
 
@@ -58,10 +48,13 @@
  public:
 
-  FROG_ReadCards()                     {  }
-  FROG_ReadCards(char* filename)       { Construct(filename); }
-  FROG_ReadCards(std::string filename) { Construct(filename.c_str()); }
+  FROG_ReadCards()                     { mAbsolutePath = string("");  }
+  FROG_ReadCards(char* filename)       { mAbsolutePath = string(""); Construct(filename); }
+  FROG_ReadCards(std::string filename) { mAbsolutePath = string(""); Construct(filename.c_str()); }
+  FROG_ReadCards(const char* AbsolutePath, const char* filename){
+										 mAbsolutePath = string(AbsolutePath);	  Construct(filename); }
 
   ~FROG_ReadCards() { } 
 
+  istream& getLine(istream& is, string& str);
 
   int GetNValues() const { return mValues.size(); }
@@ -91,4 +84,6 @@
   bool GetBool(bool Default, const char* format, ...);
 
+ public:
+  std::string  mAbsolutePath;  
 
  private:
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Texture.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Texture.cpp	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Texture.cpp	(revision 96)
@@ -33,5 +33,5 @@
 }
 
-void LoadTexture(unsigned int* id, char* strFileName, bool VerticalFlip)
+void LoadTexture(unsigned int* id, const char* strFileName, bool VerticalFlip)
 {	
 	if(!strFileName) return;
@@ -68,5 +68,5 @@
 }
 
-void SaveScreenshot(char* strFileName,unsigned int Width, unsigned int Height, void (*func)(void))
+void SaveScreenshot(const char* strFileName,unsigned int Width, unsigned int Height, void (*func)(void))
 {		
 	if(!strFileName) return;
@@ -134,5 +134,5 @@
 
 
-void LoadPNG(stTexture* Texture, char* strFileName)
+void LoadPNG(stTexture* Texture, const char* strFileName)
 {
 	png_structp png_ptr;
@@ -229,5 +229,5 @@
 
 
-void SavePNG(stTexture* Texture, char* strFileName)
+void SavePNG(stTexture* Texture, const char* strFileName)
 {
 	if(Texture->texels==NULL || Texture->width==0 || Texture->height==0) return;
Index: trunk/Utilities/FROG/Includes/FROG/FROG_Texture.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_Texture.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_Texture.h	(revision 96)
@@ -10,7 +10,5 @@
 #endif
 
-#ifdef linux
-#elif macos
-#else 
+#ifdef windows 
  #pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib")
  #pragma comment (lib,"Includes/PNGLIB/Lib/libpng13.lib")  
@@ -54,9 +52,9 @@
 stTexture* VerticalFlipTexture(stTexture* Source);
 
-void LoadTexture(unsigned int* id, char* strFileName, bool VerticalFlip=false);
-void SaveScreenshot(char* strFileName,unsigned int Width, unsigned int Height, void (*func)(void));
+void LoadTexture(unsigned int* id, const char* strFileName, bool VerticalFlip=false);
+void SaveScreenshot(const char* strFileName,unsigned int Width, unsigned int Height, void (*func)(void));
 
-void LoadPNG(stTexture* Texture, char* strFileName);
-void SavePNG(stTexture* Texture, char* strFileName);
+void LoadPNG(stTexture* Texture, const char* strFileName);
+void SavePNG(stTexture* Texture, const char* strFileName);
 
 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_View.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_View.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_View.h	(revision 96)
@@ -57,4 +57,5 @@
 
 	bool  screen_flag;
+	bool  isSwappable;
 
 	float BackGround_Color_[4];
@@ -84,4 +85,5 @@
 
 		screen_flag     = false;
+		isSwappable     = true;
 
 		BackGround_Color_[0] = 0;
@@ -106,4 +108,6 @@
 			frogObjects_->frogCard_->GetFloat(&(cam_->target_y)	,"%s_Cam_Target_Y"	,Name_);
 			frogObjects_->frogCard_->GetFloat(&(cam_->target_z)	,"%s_Cam_Target_Z"	,Name_);
+
+			isSwappable = frogObjects_->frogCard_->GetBool(isSwappable,"%s_IsSwappable", Name_);
 
 			if(geomToDisplay_.size()>0)geomToDisplay_.clear();
Index: trunk/Utilities/FROG/Includes/FROG/FROG_View_Menu.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_View_Menu.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_View_Menu.h	(revision 96)
@@ -14,5 +14,5 @@
 	class Order {
 	public:
-		bool operator () (MenuEntry* a, MenuEntry* b){
+//		bool operator () (MenuEntry* a, MenuEntry* b){
 		//	return (a->type() < b->type());
 
@@ -21,6 +21,6 @@
 //			FROG_Element_Base_With_DetId* FEBD = dynamic_cast<FROG_Element_Base_With_DetId*>(mother);
 //			if(a.Object->getMother() == b.Object->getMother() && a.Level==b.Level && FEBDN1 && FEBDN2)return (bool)strcmp(a.Name,b.Name);
-			return 0;
-		}
+//			return 0;
+//		}
 	};
 	
@@ -57,7 +57,7 @@
 		Imax = 0;
 
-		Menu_CleanUp();			
+		Menu_CleanUp();	
 		if(frogObjects_->frogEvent_)Menu_Update(frogObjects_->frogEvent_);
-		if(frogObjects_->frogGeom_ )Menu_Update(frogObjects_->frogGeom_->prim->getDaughter(0));
+		if(frogObjects_->frogGeom_ && frogObjects_->frogGeom_->prim)Menu_Update(frogObjects_->frogGeom_->prim->getDaughter(0));
 	}
 
Index: trunk/Utilities/FROG/Includes/FROG/FROG_View_Tools.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_View_Tools.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_View_Tools.h	(revision 96)
@@ -65,4 +65,6 @@
 //	printf("Swap : %s <--> %s\n",v1->Name_, v2->Name_);
 
+	if( !(v1->isSwappable && v2->isSwappable) )return;
+
 	float temp_card_vx_ = v1->card_vx_;
 	float temp_card_vy_ = v1->card_vy_;
Index: trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.cpp
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.cpp	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.cpp	(revision 96)
@@ -57,5 +57,5 @@
 
 
-bool FROG_ZLIB_Deflate(char* source_path){
+bool FROG_ZLIB_Deflate(char* source_path, bool keepIntermediateFile){
 	unsigned int N = strlen(source_path);
 
@@ -79,5 +79,5 @@
 		printf("%s has been deflate corretly\n",source_path);				
 		printf("new name is %s\n",dest_path);				
-		if(remove(source_path)!=0)perror( "Error deleting file" );
+		if(!keepIntermediateFile && remove(source_path)!=0)perror( "Error deleting file" );
 		return true;
 	}else if(returnedValue==Z_MEM_ERROR){
@@ -155,5 +155,5 @@
 
 
-bool FROG_ZLIB_Inflate(char* source_path){
+bool FROG_ZLIB_Inflate(char* source_path, bool keepIntermediateFile){
 	unsigned int N = strlen(source_path);
 
@@ -187,6 +187,6 @@
 	if(returnedValue==Z_OK){
 		printf("File %s has been inflate corretly\n",source_path);
-		printf("new name is %s\n",dest_path);
-		if(remove(source_path)!=0)perror( "Error deleting file" );
+		printf("new name is %s\n",dest_path);		
+		if(!keepIntermediateFile && remove(source_path)!=0)perror( "Error deleting file" );
 		strcpy(source_path,dest_path);
 		return true;
Index: trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.h
===================================================================
--- trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.h	(revision 95)
+++ trunk/Utilities/FROG/Includes/FROG/FROG_ZLib.h	(revision 96)
@@ -8,8 +8,7 @@
 #include "../ZLIB/zlib.h"
 
-//#ifdef linux
-//#else 
+#ifdef windows
 //	#pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib")
-//#endif
+#endif
 
 #define CHUNK 16384
@@ -20,9 +19,9 @@
 bool FROG_ZLIB_IsUnZippedFileExist(char* source_path);
 
-bool FROG_ZLIB_Inflate(char* source_path);
 int  FROG_ZLIB_Inflate(FILE *source, FILE *dest);
+bool FROG_ZLIB_Inflate(char* source_path,  bool keepIntermediateFile=false);
 
 int  FROG_ZLIB_Deflate(FILE *source, FILE *dest, int level);
-bool FROG_ZLIB_Deflate(char* source_path);
+bool FROG_ZLIB_Deflate(char* source_path,  bool keepIntermediateFile=false);
 
 #endif
