function loadmedia(k) {
	if (k!="%blob.number%" ){
		nn=grid[k];
		
		ex=nn.split(".");
		ext=ex[ex.length-1];

		extlist=new Array("");
		

		if (document.all){
		
		}else{
		e=0;
		for (i=0;i<extlist.length;i++){
			//alert(extlist[i]+"  "+ext);
			if (extlist[i]==ext){
				e=1;
			}
		}
		}


		if (document.all  ||  e==1) {
			h=screen.availHeight;
			w=screen.availWidth;
			
			s=nn.indexOf("http://");   
 			if (s!=0){nn='../../_media/'+nn;}
			if (w>800){w=800;}
			if (h>540){h=540;}
			tt="no";
			extlist=new Array("")
			for (i=0;i<extlist.length;i++){
				//alert(extlist[i]+"  "+ext);
				if (extlist[i]==ext){
					tt="yes";
				}
			}
			


			var OpenWindow=window.open(nn, "_blank");  
			p=document.location.href
			pn=p.indexOf("?");
			if (pn>0) {p=p.substring(0,pn); }
			//nnn=grid[k].split("/");
			document.location.href=p+"?grid="+grid2[k];
	  	}else{
	    		document.location.href=('../../_media/'+grid[k]);

		}
		
	}


}



function navig(k) {
		
	switch (k){
       		case '%func%' :
			break;	
		case 'print' :

  		if (document.all) 
    		   { 
        		 document.iframebrowser.focus(); 
         		 document.iframebrowser.print(); 
      	   }else{ 
		       window.frames['iframebrowser'].focus(); 
        		 window.frames['iframebrowser'].print(); 
        	   } 
		
		break;	


		case 'back':
			//alert (location);
			if (lev!=0){
				document.location.href=('../default.html');
				break;
			}


		case 'contact':
			g=''
			for (i=1;i<=lev;++i){
				g=g+'../';
			}
				
			g=g+'cts/default.html';
			document.location.href=g;
				
			break;

		case 'index':
			g=''
			for (i=1;i<=lev;++i){
				g=g+'../';
			}
				
			g=g+'indexlist.html';
			document.location.href=g;
				
			break;

		case'menu':
			if (lev!=-1){
				g=''
				for (i=1;i<=lev;++i){
					g=g+'../';
				}

					g=g+'default.html';
					document.location.href=g;
				

			}
			break;	
	}
	
	if (k!='print'){return true;}

}



