
				function Preview(f,id,pathfiletype)
					{
						str_img = eval("f.imgname"+id+".value");
						eval("f.targetPic"+id+".src = str_img")
						//eval("f.targetPic"+id+".width = 120")
						checktype(f,id,pathfiletype);
						size(f,id);
				
					if(eval("f.imgname"+id+".value == ''"))
					{
					eval("f.targetPic"+id+".style.display = 'none'")
					}else{
					eval("f.targetPic"+id+".style.display = ''")
					}
					}


					function size(f,id)
						{
							var maxsize = 150000;
							
							var img = new Image();
							img.src = eval("f.imgname"+id+".value");

								if(img.src){
								//alert("Picture Size = "+img.width +" x "+img.height+"\t");
								}
								if(img.fileSize>maxsize)
								{
									alert("\n Picture Size Over  "+maxsize+" bytes \n Please Select anothre picture because this Picture is size "+img.fileSize+" bytes     ");
								}
							}

				function checktype(f,id,pathfiletype)
					{
						var strfile = eval("f.imgname"+id+".value");
						if(strfile.length>0)
						{
							var myIndex = strfile.indexOf(".");
							var FileType = strfile.substr(strfile.length-4,4) //strfile.substr(myIndex,4);
				
							arrFileType = new Array(".PNG",".JPG","JPEG",".GIF");
							for(i=0;i<arrFileType.length;i++){
								if(FileType.toUpperCase()==arrFileType[i])
								{
									chk = true;
									break;
								}else{
									chk = false;
								}
							}
							if(!chk)
							{
								//alert(" Please Select Picture Type  jpg ,jpeg , gif  or  bmp  Only  ");
								(pathfiletype==undefined)?pathfiletype="../../_images/":pathfiletype=pathfiletype;
								
								if(FileType.toUpperCase()==".SWF")
								{eval("f.targetPic"+id+".src = pathfiletype+'flashlogo.gif'")}
								else
								{eval("f.targetPic"+id+".src = pathfiletype+'clip_1.gif'")}
								
							}
						}	
					}

					
					
					
					
					
					
					
					