var highestzIndex = 10001;
//Version No.8
//****************************************************************************************************************************************************************
//fb_dialog() Version No.8
//
function fb_dialog(oID,oToShow,host,oTITLE,oZindex,xLEFTmin, xTOPmin, xLEFTmax, xTOPmax, xMinMax, xAnimate,oGrabBarImageMin, oGrabBarImageMax) {
										 oHost = eval(host);
										 oToShow = eval(oToShow);
										 DialogLeft = 0;
 										 DialogTop = 0;
 										
                 		         //For mousedown event
                 						 //Dialogue origin is set at this location
 														 offsX =  xLEFTmin;
														 offsY =  xTOPmin;
														 oToShow.align  ='center';
														 oToShow.name = "Object to Show";

                 					//TRANS OBJECT 
														 var trans = oHost.createElement('SPAN');
                             transOBJ = oHost.body.appendChild(trans);
														 //transOBJ.width =oToShow.width;
														 //transOBJ.height =oToShow.height;
														 transOBJ.align='center';
                 						 transOBJ.style.position='absolute';
                     				 //transOBJ.style.zIndex = oZindex;
														 if(highestzIndex > oZindex) { transOBJ.style.zIndex = highestzIndex; } else{ highestzIndex = oZindex; transOBJ.style.zIndex = highestzIndex; }
                             //DialogLeft and DialogTop are declared @ eventhandlers
													if(xMinMax == 0){	 
    														      _leftMargin = xLEFTmin;
    														      _topMargin = xTOPmin;
    														      DialogLeft = xLEFTmin;
                                      DialogTop = xTOPmin;
														 }
														 else {
   														   _leftMargin = xLEFTmax;
    														 _topMargin = xTOPmax;
    														 DialogLeft = xLEFTmax;
                                 DialogTop = xTOPmax;
														 }
														 if(DialogTop > 0) transOBJ.style.top= DialogTop + '';
														 else transOBJ.style.top = _topMargin;
                     				 if(DialogLeft > 0) transOBJ.style.left= DialogLeft + '';
														 else transOBJ.style.left = _leftMargin;
 														 try{ if(oToShow.style.width!=NaN && oToShow.style.width!="" && oToShow.style.width!=null) transOBJ.style.width =  oToShow.style.width + ''; else throw new Exception();}
														 catch(e) { transOBJ.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) + ''; }
														 finally{  }
														 transOBJ.style.height = (oToShow.style.height.substr(0,oToShow.style.height.length-4)) + '25px';
	                   				 transOBJ.id = oTITLE;
    				 								 transOBJ.name = "TransOBJ";
                     				 transOBJ.tag = 'TransOBJ';
														 transOBJ.title = oTITLE;
														
	
	 												//GRAB BAR
														 var grabBar = oHost.createElement('IMG');
                     				 var baseIMG = transOBJ.appendChild(grabBar);
                 						 //baseIMG.src = "images/Google.jpg";
														 baseIMG.src = oGrabBarImageMin;
														 //baseIMG.src = 'images/grabBar.png';
														 baseIMG.title = transOBJ.title;
														 if(xMinMax != 0) {  (oToShow.style.width) ? (baseIMG.style.width = transOBJ.style.width ) :  (baseIMG.width = oToShow.width - 2)  }
														 else  baseIMG.style.width = 32;

                 						 baseIMG.style.position='absolute';
                 						 baseIMG.style.height = '25px';
														 baseIMG.style.zIndex = eval(oZindex) + 21;
														 if(xMinMax == 1){
																								 if(browser=='IE') baseIMG.style.filter='alpha(Opacity=20)';
                    														 else  baseIMG.style.opacity = 0.2;
														 }
 														 else	{            
														 							 		 if(browser=='IE') baseIMG.style.filter='alpha(Opacity=20)';
																							 else baseIMG.style.opacity = 0.2;
																	}
														 baseIMG.style.backgroundColor = '#0000ff';
														 baseIMG.name = "Grab Bar";
														 baseIMG.id = "Grab Bar";
														 
                 						  
                 						//X - close 
														 var pic_c = oHost.createElement('IMG');
                 						 pic_c.src = 'images/iw_close.gif';
                     				 pic_c.title='Close';
                     	       pic_c.style.width = '12px';
                     				 pic_c.style.heigth = '12px';
                 				     pic_c.style.position='absolute';
                 						 pic_c.style.zIndex = eval(oZindex) + 22;
                     				 pic_c.style.top = '5px';
														 if(xMinMax == 1){
																								 if(browser=='IE') pic_c.style.filter='alpha(Opacity=20)';
                    														 else  pic_c.style.opacity = 0.2;
														 }
 														 else	{            
														 							 		 if(browser=='IE') pic_c.style.filter='alpha(Opacity=20)';
																							 else pic_c.style.opacity = 0.2;
																	}
														 (oToShow.style.width) ? pic_c.style.left = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) - 22 :  pic_c.style.left = oToShow.width - 24; 
                 					   pic_c.style.filter = 'invert';
                 						 var Close_x = transOBJ.appendChild(pic_c);
														 Close_x.name = "Close X";
														 Close_x.id = "Close X";
                 						 
                 					
                 					//TITLE
                 					   var titleLabel = oHost.createElement('SMALL');
                 						 var objtitleLabel = transOBJ.appendChild(titleLabel);
                 						 objtitleLabel.id = 'Title';
														 objtitleLabel.name = 'Title';
                  					 if(xMinMax != 1) {
														 							 		 if(browser=='IE') objtitleLabel.style.filter='alpha(Opacity=100)';
														 							 		 else if(browser=='Firefox') objtitleLabel.style.MozOpacity = 1;
																							 else objtitleLabel.style.Opacity = 1;
																				      }
														 else	{
														 							 		 if(browser=='IE') objtitleLabel.style.filter='alpha(Opacity=100)';
														 							 		 else if(browser=='Firefox') objtitleLabel.style.MozOpacity = 1;
																							 else objtitleLabel.style.Opacity = 1;
																	}
                 						 objtitleLabel.innerHTML = oTITLE;
														 objtitleLabel.style.color = '#AABBCC';
														 objtitleLabel.style.position='absolute';
                 						 objtitleLabel.style.zIndex = eval(oZindex);
                     				 objtitleLabel.style.top = 5;
                 						 objtitleLabel.style.left= 50;
														 objtitleLabel.style.width= 200;
														 objtitleLabel.name = "Title";
                 						 
                 /**********************************************************************/
                 //                           object To Show
                 /**********************************************************************/
								 						 	
                 					
														 var _oToShow = transOBJ.appendChild(oToShow);
														_oToShow.style.position='absolute';		 
                 						//_oToShow.style.zIndex=30;		 
                 						_oToShow.style.top = '25px';		 
                 						_oToShow.style.left= '0px';
														_oToShow.tabIndex = 1;
														_oToShow.id = oID;
														_oToShow.name = "_oToShow";
						
														if(xMinMax == 0){ oToShow.style.visibility = "hidden"; 	pic_c.style.visibility = "hidden";	oToShow.parentNode.style.zIndex = eval(oZindex); }
														else { baseIMG.src = oGrabBarImageMax;    if(highestzIndex > eval(transOBJ.parentNode.style.zIndex)) { transOBJ.style.zIndex = highestzIndex + 1;  oToShow.style.zIndex = highestzIndex + 1;  baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1;  } else {highestzIndex = eval(transOBJ.style.zIndex) + 1;  transOBJ.style.zIndex = highestzIndex + 1;  oToShow.style.zIndex = highestzIndex + 1;   baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1;} /*  alert(" max "+transOBJ.style.zIndex);	*/  }
														//_oToShow.style.filter = "progid:DXImageTransform.Microsoft.Shadow(color='#ff0000', Direction=135, Strength=20 );"


										
                 /**********************************************************************/
                 //        fb_dialog   E V E N T   H A N D L E R S
                 /**********************************************************************/

                 					 if(window.addEventListener){ // Mozilla, Netscape, Firefox
                 							Close_x.addEventListener('mouseover', Close_x_onmouseover_eventhandler, false);
        											Close_x.addEventListener('mouseout', Close_x_onmouseout_eventhandler, false);
                 							//Close_x.addEventListener('click',  function(){  xMinMax = 0;  baseIMG.src = oGrabBarImageMin;    Close_x.parentNode.style.zIndex = eval(oZindex); /* alert("-200 in fb_dialog"+baseIMG.transObject.style.zIndex); */    }, false);
                 							Close_x.addEventListener('click', Close_x_onclick_eventhandler , false );	
                 							//Close_x.addEventListener('click',  function(){ cancel_fb_Dialog(host,oID); /* fadeto_fb_Dialog(host,oID,50); hide_fb_Dialog(host,oID);  fadeto_fb_Dialog(host,oID,50); */  }, false);
															Close_x._type       = 'close'; //changed ver13 from closeDialog  ->  close
                 							Close_x.oImage      = Close_x;
                       				Close_x.hostObject  =  oHost;  
                 							Close_x.transObject = transOBJ;
                             	Close_x._Object     = transOBJ;
															Close_x.objectToShow  = oToShow;
															Close_x.baseIMG     = baseIMG;
															Close_x.topMax     =  xTOPmax;
															Close_x.leftMax     = xLEFTmax;
															Close_x.topMin     =  xTOPmin;
															Close_x.leftMin     = xLEFTmin;
															Close_x.objtitleLabel = objtitleLabel;
															baseIMG.addEventListener('dblclick', function(){  oToShow.style.opacity=0; oToShow.style.visibility = "visible"; pic_c.style.visibility = "visible";   fadeinDialog.speed = 10;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0.2;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );   }, false );	
															baseIMG.addEventListener('click', function(){  if(xMinMax != 1)    if(baseIMG.transObject.style.top == xTOPmin+"" && baseIMG.transObject.style.left == xLEFTmin +"")      {   if(browser=='Firefox')  oToShow.style.MozOpacity=0; else oToShow.style.Opacity=0;   oToShow.style.visibility = "visible";    if(highestzIndex > eval(baseIMG.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; baseIMG.transObject.style.zIndex =  highestzIndex + 1;  oToShow.style.zIndex =  highestzIndex + 1;   baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; } else { highestzIndex = eval(baseIMG.transObject.style.zIndex) + 1; baseIMG.transObject.style.zIndex =  highestzIndex + 1; oToShow.style.zIndex =  highestzIndex + 1;   baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }    pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax ); }                        
																																						  						 			else if(baseIMG.transObject.style.top == (xTOPmin+1) && baseIMG.transObject.style.left == (xLEFTmin + 1))      {  oToShow.style.opacity=0;   oToShow.style.visibility = "visible";   if(highestzIndex >  eval(baseIMG.parentNode.style.zIndex)) { highestzIndex = highestzIndex + 1;  baseIMG.parentNode.style.zIndex =  highestzIndex + 1;   oToShow.style.zIndex =  highestzIndex + 1;   baseIMG.style.zIndex =  highestzIndex + 1;    Close_x.style.zIndex =  highestzIndex + 1; } else { highestzIndex =  eval(baseIMG.parentNode.style.zIndex) + 1;  baseIMG.parentNode.style.zIndex =  highestzIndex + 1;  oToShow.parentNode.style.zIndex =  highestzIndex + 1;  baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }   pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax ); }  }, false);
															baseIMG.addEventListener('click', function(){  if(xMinMax != 1){ xMinMax = 1;   baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) + '';   baseIMG.style.opacity=0.2;       }       oToShow.style.visibility = "visible"; pic_c.style.visibility = "visible";        }, false);
															baseIMG.addEventListener('mousedown', function(){  if(highestzIndex > eval(baseIMG.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; baseIMG.transObject.style.zIndex =  highestzIndex + 1;  oToShow.style.zIndex =  highestzIndex + 1;  baseIMG.style.zIndex =  highestzIndex + 1;   Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex = eval(baseIMG.transObject.style.zIndex) + 1; baseIMG.transObject.style.zIndex =  highestzIndex; oToShow.style.zIndex =  highestzIndex;  baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1; }  /*  alert(" baseIMG.transObject: "+ baseIMG.transObject.style.zIndex);  */    }, false);
															//Make 'mousedown' the same as 'click' eventhandler
															baseIMG.addEventListener('mousedown', function(){  if(xMinMax != 1)   if(baseIMG.transObject.style.top == xTOPmin+"" && baseIMG.transObject.style.left == xLEFTmin +"")      {  oToShow.style.opacity=0;   oToShow.style.visibility = "visible";   if(highestzIndex >  eval(baseIMG.parentNode.style.zIndex)) { highestzIndex = highestzIndex + 1;  baseIMG.parentNode.style.zIndex =  highestzIndex;  oToShow.style.zIndex =  highestzIndex; baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex =  eval(baseIMG.parentNode.style.zIndex) + 1;  baseIMG.parentNode.style.zIndex =  highestzIndex; oToShow.style.zIndex =  highestzIndex;   baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }   /*  alert("baseIMG.parentNode: "+ baseIMG.parentNode.style.zIndex); */   pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );                 }           }, false);
															baseIMG.addEventListener('mousedown', function(){  if(xMinMax != 1){ xMinMax = 0;   baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) + '';      baseIMG.src = oGrabBarImageMax;        baseIMG.style.opacity=0.2;       }        if(baseIMG.transObject.style.top == xTOPmin && baseIMG.transObject.style.left == xLEFTmin) {   baseIMG.transObject.style.top = xTOPmax+"";	baseIMG.transObject.style.left = xLEFTmax+"";     }        oToShow.style.visibility = "visible"; pic_c.style.visibility = "visible";           }, false);
															baseIMG.addEventListener('mousedown',  dragHandler,  false); 
															baseIMG.addEventListener('mouseout', dragbar_onmouseout_eventhandler , false);
															baseIMG.addEventListener('mouseout', function(){  if(_isOutsideGrabBar) {  if(baseIMG.transObject.style.top != xTOPmin && baseIMG.transObject.style.left != xLEFTmin)  {  Close_x.style.opacity=0.01; baseIMG.style.opacity=0.01; objtitleLabel.style.opacity=0.01;     } else if(xMinMax != 1 && baseIMG.transObject.style.top == xTOPmin && baseIMG.transObject.style.left == xLEFTmin) {   Close_x.style.opacity=0.20; baseIMG.style.opacity=0.20; objtitleLabel.style.opacity=1;  }} else{  Close_x.style.opacity=0.05; baseIMG.style.opacity=0.05; objtitleLabel.style.opacity=0.05;   }   }, false );
															baseIMG.addEventListener('mouseover', dragbar_onmouseover_eventhandler, false); 
															baseIMG.addEventListener('mouseover', function(){ baseIMG.style.opacity = 0.2;    Close_x.style.opacity=1;   objtitleLabel.style.opacity = 1;   if(baseIMG.transObject.style.top == xTOPmin+"" && baseIMG.transObject.style.left == xLEFTmin+"")   {   baseIMG.style.opacity = 1;   } baseIMG.style.cursor = 'pointer';       }, false);
															baseIMG._type       = 'dragBar';
                 							baseIMG.oImage      = Close_x;
															baseIMG.baseIMG      = baseIMG;
                       				baseIMG.hostObject  =  oHost; 
                 							baseIMG.transObject = transOBJ;
															_oToShow.addEventListener('mouseout', picMouseOutHandler, false);
															_oToShow.addEventListener('mouseover', picMouseOverHandler, false);
															_oToShow._type       = 'dragBar';
                 							_oToShow.oImage      = baseIMG;
                       				_oToShow.hostObject  =  oHost; 
                 							_oToShow.transObject = transOBJ;
                 							objtitleLabel.addEventListener('mouseover', function(){  if(xMinMax != 1 ){  objtitleLabel.style.cursor = "pointer";  objtitleLabel.baseIMG.style.opacity=1;  objtitleLabel.oImage.style.opacity=1;   objtitleLabel.style.color = "#FFFFFF"; objtitleLabel.style.textDecoration="underline"  } }, false);
															objtitleLabel.addEventListener('mouseout', function(){   objtitleLabel.style.cursor = "arrow";   objtitleLabel.baseIMG.style.opacity=0.2;  objtitleLabel.oImage.style.opacity=0.2;  objtitleLabel.style.color = "#AABBCC";   objtitleLabel.style.textDecoration="none"     }, false);
															objtitleLabel.addEventListener('click', function(){  if(xMinMax != 1)   if(objtitleLabel.transObject.style.top == xTOPmin+"" && objtitleLabel.transObject.style.left == xLEFTmin +"")      {   oToShow.style.opacity=0;   oToShow.style.visibility = "visible";    if(highestzIndex > eval(objtitleLabel.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex + 1;  oToShow.style.zIndex =  highestzIndex + 1;  objtitleLabel.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; } else { highestzIndex = eval(objtitleLabel.transObject.style.zIndex) + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex + 1; oToShow.style.zIndex =  highestzIndex + 1;  objtitleLabel.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }   /*  alert(" transObject: "+baseIMG.transObject.style.zIndex);	*/   pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax ); }                        
																																						  						 			else if(objtitleLabel.transObject.style.top == (xTOPmin+1) && objtitleLabel.transObject.style.left == (xLEFTmin + 1))      {   oToShow.style.opacity=0;   oToShow.style.visibility = "visible";   if(highestzIndex >  eval(objtitleLabel.parentNode.style.zIndex)) { highestzIndex = highestzIndex + 1;  objtitleLabel.parentNode.style.zIndex =  highestzIndex + 1;   oToShow.style.zIndex =  highestzIndex + 1;   objtitleLabel.style.zIndex =  highestzIndex + 1;    Close_x.style.zIndex =  highestzIndex + 1; } else { highestzIndex =  eval(objtitleLabel.parentNode.style.zIndex) + 1;  objtitleLabel.parentNode.style.zIndex =  highestzIndex + 1;  oToShow.parentNode.style.zIndex =  highestzIndex + 1;  objtitleLabel.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }   /*  alert(" oToShow.parentNode: "+oToShow.parentNode.style.zIndex); */  pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax ); }  }, false);
															objtitleLabel.addEventListener('click', function(){  if(xMinMax != 1){ xMinMax = 0;   objtitleLabel.baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) + '';   objtitleLabel.baseIMG.style.opacity=0.2;   }        if(objtitleLabel.transObject.style.top == xTOPmin+"" && objtitleLabel.transObject.style.left == xLEFTmin+"") {       /* if( xLEFTmax < xLEFTmin + 100 ) { xLEFTmax = xLEFTmin + 110; alert(xLEFTmax); }  */                           /*     baseIMG.transObject.style.top = xTOPmax+"";	baseIMG.transObject.style.left = xLEFTmax+"";  */    }    oToShow.style.visibility = "visible"; pic_c.style.visibility = "visible";        }, false);
															objtitleLabel.addEventListener('mousedown', function(){  if(highestzIndex > eval(objtitleLabel.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex + 1;  oToShow.style.zIndex =  highestzIndex + 1;  objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1;   Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex = eval(objtitleLabel.transObject.style.zIndex) + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex; oToShow.style.zIndex =  highestzIndex;  objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1; }  /*  alert(" baseIMG.transObject: "+ baseIMG.transObject.style.zIndex);  */    }, false);
															objtitleLabel.addEventListener('mousedown', function(){  if(xMinMax != 1)   if(objtitleLabel.transObject.style.top == xTOPmin+"" && objtitleLabel.transObject.style.left == xLEFTmin +"")      { oToShow.style.opacity=0;   oToShow.style.visibility = "visible";   if(highestzIndex >  eval(objtitleLabel.parentNode.style.zIndex)) { highestzIndex = highestzIndex + 1;  objtitleLabel.parentNode.style.zIndex =  highestzIndex;  oToShow.style.zIndex =  highestzIndex; objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex =  eval(objtitleLabel.parentNode.style.zIndex) + 1;  objtitleLabel.parentNode.style.zIndex =  highestzIndex; oToShow.style.zIndex =  highestzIndex;   objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }   /*  alert("baseIMG.parentNode: "+ baseIMG.parentNode.style.zIndex); */   pic_c.style.visibility = "visible";   fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );                 }           }, false);
															objtitleLabel.addEventListener('mousedown', function(){  if(xMinMax != 1){ xMinMax = 0;   objtitleLabel.baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2)) + '';      objtitleLabel.baseIMG.src = oGrabBarImageMax;      objtitleLabel.baseIMG.style.opacity=0.2; objtitleLabel.oImage.style.opacity=0.2;     }        if(objtitleLabel.transObject.style.top == xTOPmin && objtitleLabel.transObject.style.left == xLEFTmin) {   objtitleLabel.transObject.style.top = xTOPmax+"";	objtitleLabel.transObject.style.left = xLEFTmax+"";     }        oToShow.style.visibility = "visible"; pic_c.style.visibility = "visible";           }, false);
															objtitleLabel.oImage   = Close_x;
															objtitleLabel.baseIMG  = baseIMG;
															objtitleLabel.transObject = transOBJ;
														 } 
 												else { // IE
                 							Close_x.attachEvent('onmouseover', Close_x_onmouseover_eventhandler );
				         							Close_x.attachEvent('onmouseout', Close_x_onmouseout_eventhandler);
                             	//Close_x.attachEvent('onclick', function(){ xMinMax = 0;  baseIMG.src = oGrabBarImageMin;   Close_x.transObject.style.zIndex = eval(oZindex); /* alert("-200 in fb_dialog"+baseIMG.transObject.style.zIndex); */ Close_x_onclick_eventhandler(window.event); });
															Close_x.attachEvent('onclick', function(){ Close_x_onclick_eventhandler(window.event); /* cancel_fb_Dialog(host,oID);  hide_fb_Dialog(host,oID); fadeto_fb_Dialog(host,oID,50); */   });
															//Close_x.attachEvent('onclick', function(){   cancel_fb_Dialog(host,oID);  /* fadeto_fb_Dialog(host,oID,50);   hide_fb_Dialog(host,oID);  fadeto_fb_Dialog(host,oID,50); */   });
															Close_x._type       = 'close'; //changed ver13 from closeDialog  ->  close
                 							Close_x.oImage      = Close_x;
                       				Close_x.hostObject  =  oHost; 
                 							Close_x.transObject = transOBJ;
                             	Close_x._Object     = transOBJ;
															Close_x.objectToShow     = oToShow;
															Close_x.baseIMG     = baseIMG;
															Close_x.objtitleLabel = objtitleLabel;
															Close_x.topMax     =  xTOPmax;
															Close_x.leftMax     = xLEFTmax;
															Close_x.topMin     =  xTOPmin;
															Close_x.leftMin     = xLEFTmin;
															baseIMG.attachEvent('onclick', function(){   if(xMinMax != 1 ){  xMinMax = 1;                         
																														 							 if(baseIMG.transObject.style.top == xTOPmax && baseIMG.transObject.style.left == xLEFTmax && xAnimate )               { /* alert("2   top:  "+baseIMG.transObject.style.top+"   xTOPmax:   "+ xTOPmax + "  left:  "+ baseIMG.transObject.style.left +"   xLEFTmax:  "+xLEFTmax+"  xAnimate:  "+xAnimate); */    oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();   Close_x.style.visibility = "visible";   }   
																														 							 else  if(baseIMG.transObject.style.top == (xTOPmax + 1) && baseIMG.transObject.style.left == (xLEFTmax + 1) && xAnimate )  { /* alert("2   top:  "+baseIMG.transObject.style.top+"   xTOPmax:   "+ xTOPmax + 1 + "  left:  "+ baseIMG.transObject.style.left +"   xLEFTmax:  "+xLEFTmax+ 1 +"  xAnimate:  "+xAnimate); */ oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();   Close_x.style.visibility = "visible";   }             
																																					 else  if(baseIMG.transObject.style.top == xTOPmax && baseIMG.transObject.style.left == xLEFTmax && xAnimate == 0) {   oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.visibility = "visible";   Close_x.style.visibility = "visible";   fadeinDialog.speed = 10;  fadeinDialog.finalOpacity = 100;   fadeinDialog.currentOpacity = 20;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );  }                               
																																					 else  if(baseIMG.transObject.style.top == (xTOPmax + 1) && baseIMG.transObject.style.left == (xLEFTmax + 1) && xAnimate == 0) {    oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.visibility = "visible";   Close_x.style.visibility = "visible";   fadeinDialog.speed = 10;  fadeinDialog.finalOpacity = 100;   fadeinDialog.currentOpacity = 20;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );  }    }   });
															baseIMG.attachEvent('onclick', function(){ if(xMinMax == 0){       baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2));                baseIMG.src = oGrabBarImageMax;                       baseIMG.style.filter='alpha(Opacity=20)';  oToShow.style.visibility = "visible";   if(oToShow.id != 'googlemapID' && oToShow.id != 'localsearchID') oToShow.style.filter='alpha(Opacity=100)';    Close_x.oImage.style.visibility = "visible";   }  if(baseIMG.transObject.style.top == xTOPmin+"" && baseIMG.transObject.style.left == xLEFTmin) { baseIMG.transObject.style.top = xTOPmax;	baseIMG.transObject.style.left = xLEFTmax;  if(highestzIndex > eval(baseIMG.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; baseIMG.transObject.style.zIndex =  highestzIndex + 1;  baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex = eval(baseIMG.transObject.style.zIndex) + 1; baseIMG.transObject.style.zIndex =  highestzIndex; baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1; }  /* alert("from min to max "+baseIMG.transObject.style.zIndex); */   }              });
															baseIMG.attachEvent('onmousedown', function(){   if(highestzIndex > eval(baseIMG.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; baseIMG.transObject.style.zIndex =  highestzIndex + 1;  oToShow.style.zIndex =  highestzIndex + 1;  baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1;   } else { highestzIndex = eval(baseIMG.transObject.style.zIndex) + 1; baseIMG.transObject.style.zIndex =  highestzIndex; oToShow.style.zIndex =  highestzIndex;  baseIMG.style.zIndex =  highestzIndex + 1; Close_x.style.zIndex =  highestzIndex + 1; }    /*  alert("any click "+baseIMG.transObject.style.zIndex + "  oToShow:  " + oToShow.style.zIndex);   */         });
															baseIMG.attachEvent('onmousedown', function(){    if(baseIMG.transObject.style.top != xTOPmin+"" && baseIMG.transObject.style.left != xLEFTmin+"")  dragHandler(window.event);    /*   oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();              oToShow.style.visibility = "visible";   Close_x.style.visibility = "visible";  */       });
															baseIMG.attachEvent('onmouseout', function(){ dragbar_onmouseout_eventhandler(window.event,oHost,DialogLeft,DialogTop,baseIMG.style.width,baseIMG.style.height); if(_isOutsideGrabBar)  if(baseIMG.transObject.style.top != xTOPmin+"" && baseIMG.transObject.style.left != xLEFTmin+"") {  Close_x.style.filter='alpha(Opacity=1)'; baseIMG.style.filter='alpha(Opacity=1)'; objtitleLabel.style.filter='alpha(Opacity=1)'; }  else if(xMinMax != 1 && baseIMG.transObject.style.top != xTOPmin && baseIMG.transObject.style.left != xLEFTmin)  {    Close_x.style.filter='alpha(Opacity=20)'; baseIMG.style.filter='alpha(Opacity=20)'; objtitleLabel.style.filter='alpha(Opacity=20)'; }  else {    Close_x.style.filter='alpha(Opacity=20)'; baseIMG.style.filter='alpha(Opacity=20)'; objtitleLabel.style.filter='alpha(Opacity=100)'; baseIMG.style.cursor = 'arrow';  }          });
 															baseIMG.attachEvent('onmouseover', function(){  dragbar_onmouseover_eventhandler(window.event);  baseIMG.style.filter='alpha(Opacity=20)';      Close_x.style.filter='alpha(Opacity=100)';  objtitleLabel.style.filter='alpha(Opacity=100)';    if(baseIMG.transObject.style.top == xTOPmin+"" && baseIMG.transObject.style.left == xLEFTmin+""){  baseIMG.style.filter='alpha(Opacity=100)'; }    baseIMG.style.cursor = 'pointer';  });
                 							baseIMG._type       = 'dragBar';
                 							baseIMG.oImage      = Close_x;
															baseIMG.baseIMG      = baseIMG;
                       				baseIMG.hostObject  =  oHost; 
                 							baseIMG.transObject = transOBJ;
															baseIMG._oToShow     = _oToShow;
                 							objtitleLabel.attachEvent('onmouseover', function(){  if(xMinMax != 1 ){   objtitleLabel.style.cursor = "pointer";   objtitleLabel.baseIMG.style.filter = "alpha(Opacity=100)";   objtitleLabel.oImage.style.filter = "alpha(Opacity=100)";   objtitleLabel.style.color = "#FFFFFF"; objtitleLabel.style.textDecoration="underline"  }    });
															objtitleLabel.attachEvent('onmouseout', function(){   objtitleLabel.style.cursor = "arrow";   objtitleLabel.baseIMG.style.filter = "alpha(Opacity=20)"; objtitleLabel.oImage.style.filter = "alpha(Opacity=20)";  objtitleLabel.style.color = "#AABBCC";   objtitleLabel.style.textDecoration="none"     });
															objtitleLabel.attachEvent('onclick', function(){   if(xMinMax != 1 ){  xMinMax = 1;                         
																														 							 if(oToShow.style.top == xTOPmax && objtitleLabel.transObject.style.left == xLEFTmax && xAnimate )               {   /* alert("2   top:  "+baseIMG.transObject.style.top+"   xTOPmax:   "+ xTOPmax + "  left:  "+ baseIMG.transObject.style.left +"   xLEFTmax:  "+xLEFTmax+"  xAnimate:  "+xAnimate); */    oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();   Close_x.style.visibility = "visible";   }   
																														 							 else  if(oToShow.style.top == (xTOPmax + 1) && oToShow.style.left == (xLEFTmax + 1) && xAnimate )  { /* alert("2   top:  "+baseIMG.transObject.style.top+"   xTOPmax:   "+ xTOPmax + 1 + "  left:  "+ baseIMG.transObject.style.left +"   xLEFTmax:  "+xLEFTmax+ 1 +"  xAnimate:  "+xAnimate); */ oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();   Close_x.style.visibility = "visible";   }             
																																					 else  if(oToShow.style.top == xTOPmax && oToShow.style.left == xLEFTmax && xAnimate == 0) {    oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.visibility = "visible";   Close_x.style.visibility = "visible";   fadeinDialog.speed = 10;  fadeinDialog.finalOpacity = 100;   fadeinDialog.currentOpacity = 20;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );  }                               
																																					 else  if(oToShow.style.top == (xTOPmax + 1) && oToShow.style.left == (xLEFTmax + 1) && xAnimate == 0) {  oToShow.style.filter='alpha(Opacity=0)';   oToShow.style.visibility = "visible";   Close_x.style.visibility = "visible";   fadeinDialog.speed = 10;  fadeinDialog.finalOpacity = 100;   fadeinDialog.currentOpacity = 20;    fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax );  }    }   });
															objtitleLabel.attachEvent('onclick', function(){ if(xMinMax == 0){ objtitleLabel.baseIMG.style.width = (oToShow.style.width.substr(0,oToShow.style.width.length-2));                 objtitleLabel.baseIMG.src = oGrabBarImageMax;                       objtitleLabel.baseIMG.style.filter='alpha(Opacity=20)';   oToShow.style.visibility = "visible";     if(oToShow.id != 'googlemapID' && oToShow.id != 'localsearchID'   )   oToShow.style.filter='alpha(Opacity=100)'; else {   oToShow.style.filter =  "progid:DXImageTransform.Microsoft.Pixelate();";  oToShow.filters[0].Apply();  oToShow.filters[0].Play();   }    if(document.title=="3D Drafting - Clayton Melbourne Australia ") window.parent.frames['RP'].document.location.reload();   Close_x.oImage.style.visibility = "visible";   }  if(objtitleLabel.transObject.style.top == xTOPmin+"" && objtitleLabel.transObject.style.left == xLEFTmin) { objtitleLabel.transObject.style.top = xTOPmax;	objtitleLabel.transObject.style.left = xLEFTmax;  if(highestzIndex > eval(objtitleLabel.transObject.style.zIndex)) { highestzIndex = highestzIndex + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex + 1;  objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1;} else { highestzIndex = eval(objtitleLabel.transObject.style.zIndex) + 1; objtitleLabel.transObject.style.zIndex =  highestzIndex; objtitleLabel.baseIMG.style.zIndex =  highestzIndex + 1;  Close_x.style.zIndex =  highestzIndex + 1; }  /* alert("from min to max "+baseIMG.transObject.style.zIndex); */   }              });
															objtitleLabel.oImage      = Close_x;
															objtitleLabel.baseIMG  = baseIMG;
															objtitleLabel.transObject = transOBJ;
														}
                 				
                 				return transOBJ; 
 }
							 
	
//**********************************************************       H O W   T O    U S E   D I A L O G      *******************************************************
//_objToShow
//alert(document.getElementById(oID).name);
//TransOBJ
//alert(document.getElementById(oID).parentNode.name);
//Grab Bar
//alert(document.getElementById(oID).parentNode.childNodes[0].name);
//**********************************************************               H I D E   D I A L O G           *******************************************************

function cancel_fb_Dialog(oHost,oID){
				 var host = eval(oHost);
				 host.body.removeChild(host.getElementById(oID).parentNode);
}

function fadeto_fb_Dialog(oHost,oID,opacity){
     var host = eval(oHost);
     if(browser=="IE") host.getElementById(oID).parentNode.style.filter = "alpha(opacity="+opacity+")"; 
		 else host.getElementById(oID).parentNode.style.opacity = opacity / 100;
}

function hide_fb_Dialog(oHost,oID){
    var host = eval(oHost);
    host.getElementById(oID).parentNode.style.visibility = "hidden";
}
//***********************************************************              S H O W     D I A L O G           *****************************************************
function show_fb_Dialog(oHost,oID,oLEFT,oTOP, oZIndex){
var host = eval(oHost);
//alert("show_fb_Dialog:  "+ host);
var fb_Dialog = host.getElementById(oID);
			 fb_Dialog.style.visibility = "visible";
			 fb_Dialog.style.zIndex = oZIndex + 1;
			 if(browser=="IE") fb_Dialog.style.filter = "alpha(Opacity=100)";
			 else fb_Dialog.style.opacity = 1;
var fb_TRANS = host.getElementById(oID).parentNode;
       fb_TRANS.style.visibility = "visible";    
			 fb_TRANS.style.top = oTOP;
       fb_TRANS.style.left = oLEFT; 
			 fb_TRANS.style.zIndex = oZIndex + 1;
var fb_GrabBar = host.getElementById(oID).parentNode.childNodes[0];
			 fb_GrabBar.style.width = fb_Dialog.style.width.substr(0,fb_Dialog.style.width.length-2);
			 fb_GrabBar.style.visibility = "visible";
			 fb_GrabBar.style.zIndex =  21;
			 if(browser=="IE") fb_GrabBar.style.filter = "alpha(Opacity=0)";
			 else fb_GrabBar.style.opacity = 0.5;
var fb_Close_x = host.getElementById(oID).parentNode.childNodes[1];
			 fb_Close_x.style.visibility = "visible";
			 fb_Close_x.style.zIndex = eval(oZIndex + 22);
			 if(browser=="IE") fb_Close_x.style.filter = "alpha(Opacity=0)";
			 else fb_Close_x.style.opacity = 0;
			 fb_Close_x.style.zIndex = fb_GrabBar.style.zIndex + 1;	
var fb_Title = host.getElementById(oID).parentNode.childNodes[2];
			 fb_Title.style.visibility = "visible";
			 fb_Title.style.zIndex = 0;
			 if(browser=="IE") fb_Title.style.filter = "alpha(Opacity=0)";
			 else fb_Title.style.opacity = 0;
			 fb_Title.style.zIndex = fb_GrabBar.style.zIndex - 1;	
 }
//****************************************************************************************************************************************************************
//fb_showTXT() Version No.1
//
function fb_showTXT(oTxtID, host, oHTML, oBackgroundOuter, oPadding, oBorder, oBorderRadius1, oBorderRadius2, oBorderRadius3, oBorderRadius4, oBorderColor, oWIDTH, oHEIGHT, oLEFT, oTOP){
				 			oHost = eval(host); 		 
					   var spn = oHost.createElement("SPAN");
						 spn.id = "txt_id";
						 //spn.style.width = oWIDTH  + oPadding + oBorder * 2;   //Removed in ver13
						 //spn.style.height = oHEIGHT + oPadding + oBorder * 2;
						 spn.style.width = oWIDTH;
						 spn.style.height = oHEIGHT;
						 spn.style.position = "absolute";
						 spn.style.zIndex = 20;
						 spn.style.padding = "2px";
    				 //Grab bar is 25px high, so make this bigger
						 spn.style.top = oTOP;
						 spn.style.left = oLEFT;
						 var width = (browser=="IE") ? oWIDTH : (oWIDTH - oPadding*2 - oBorder*2)  //Added in ver13
						 var height = (browser=="IE") ? oHEIGHT : (oHEIGHT - oPadding*2 - oBorder*2)
						 spn.innerHTML = "<div id="+oTxtID+" align='center'  style=' width:" + width + "px; height:" + height + "px; padding:"+oPadding + "px;    font-weight:normal; color:#00000F; background: "+oBackgroundOuter+";  padding:"+oPadding+"px;   border:"+oBorder+"px solid "+oBorderColor+";   -webkit-border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px;  border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px;  -moz-border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px; ' >\n"+
													    oHTML + "\n"+
													 "</div>\n";
													
			var y = oHost.body.appendChild(spn);
						y.style.width = spn.style.width;
						y.style.height = spn.style.height;
						
			return y;
}//End of function fb_showTXT()
//
//****************************************************************************************************************************************************************
//fb_playWMV() Version No.1
//
function fb_playWMV(ID, host, Player7video, oUIMODE, oAUTOSTART, oEMBEDMode, oPLAYCOUNT, oWIDTH, oHEIGHT, oPOS, oLEFT, oTOP, oBASEURL){			 
			 host = eval(host);
			
				
				
				if(oEMBEDMode && browser=="IE"){
					var o = ' <EMBED Name= ';
					o +=   ID;
					o += ' Src= ';
					o +=   Player7video;
					o += ' PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download/"';
					//o += ' PLUGINSPAGE="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp"';
					o += ' ShowDisplay = false';
					o += ' AllowChangeDisplaySize = false';
					o += ' AutoSize = false';
					o += ' stretchToFit = true';
					o += ' windowlessVideo = true';
					o += ' enableContextMenu = true';
					o += ' AutoStart =';
					o += oAUTOSTART;
					o += ' playCount=';
					o += oPLAYCOUNT;
          if(oWIDTH!="") o += ' width= ';
					if(oWIDTH!="") o +=  oWIDTH;
					if(oHEIGHT!="") o += ' height=';
					if(oHEIGHT!="") o += oHEIGHT;			    
					if (oUIMODE=="invisible")
				   {
				     o += ' TransparentAtStart=1';
				   }		 
			    if (oUIMODE=="none") 
           {
				     //alert("In none mode");
						 o += ' ShowControls="0"';
						 o += ' ShowAudioControls="0"';
				     o += ' ShowTracker="0"';
				     o += ' EnableTracker="0"';
				     o += ' ShowPositionControls="0"';
				     o += ' EnablePositionControls="0"';
				     o += ' ShowStatusBar=0';
           } 
          if (oUIMODE=="mini") 
           {
				     //alert("In mini mode");
						 o += ' ShowControls=1';
						 o += ' ShowAudioControls="1"';
				     o += ' ShowTracker=0';
				     o += ' EnableTracker=0';
				     o += ' ShowPositionControls=0';
				     o += ' EnablePositionControls=0';
 				     o += ' ShowStatusBar=0';
	           }  
          if (oUIMODE=="full") 
           {
				     o += ' ShowControls=1';
						 o += ' ShowAudioControls="1"';
				     o += ' ShowTracker=1';
				     o += ' EnableTracker=1';
				     o += ' ShowPositionControls=1';
				     o += ' EnablePositionControls=1';
				     o += ' ShowStatusBar=1';
           }
					o += ' TYPE="application/x-ms-wmp"></EMBED>';
					}//if(browser=="IE")
					else if(browser=="IE") {
													  var o = '<OBJECT id=';
																o += ID;
													      o += '</OBJECT>';		
													}
		
              			      
											// WMPlayer in Mozilla
              				if(browser!="IE"){	
                   					obj = host.createElement("object");
														obj.id = ID;
                  					obj.type = "video/x-ms-wmv";
                  					obj.data = Player7video;
														obj.src = Player7video;
														obj.width = oWIDTH;		 
                  					obj.height = oHEIGHT;			 
                  					obj.setAttribute("FileName", Player7video);			 
                  					obj.setAttribute("playCount", oPLAYCOUNT);	
                  					obj.setAttribute("autostart", oAUTOSTART);
														obj.setAttribute("showcontrols", "false");
														obj.setAttribute("shrinkToFit","false");
											}//if(browser!="IE")

													 var  _wmv = host.createElement("SPAN");	
              						 if(browser=="IE"){ _wmv.innerHTML = o; }
													 else _wmv.appendChild(obj);
													  //if(browser=="IE") _wmv.innerHTML = o; else  _wmv.innerHTML = obj;
                  				 _wmv.width = oWIDTH;		 
                  				 _wmv.height = oHEIGHT;			 
													 _wmv.style.position = oPOS;
              						 _wmv.style.left = oLEFT;
              						 _wmv.style.top = oTOP;
													 
              						 
              					var y = host.body.appendChild(_wmv);
              					var wmv = y.childNodes[0];
									
 
											//ver7 or higher WMPlayer in IE
              				if(oEMBEDMode==false && browser=="IE"){
												 wmv.classid = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6";				 
              					 wmv.id = ID;
              					 wmv.url = Player7video;
												 if(oWIDTH!="") wmv.width = oWIDTH;
               					 if(oHEIGHT!="") wmv.height = oHEIGHT;		
                         wmv.setAttribute("enabled","true");
												 wmv.setAttribute("uimode",oUIMODE);
                         if(!oAUTOSTART) wmv.controls.Stop();
												 else  wmv.controls.Play();
                         wmv.setAttribute("playcount",oPLAYCOUNT);
												 //wmv.setAttribute("stretchToFit","false");
                         wmv.setAttribute("windowlessVideo","true");
                         //if (wmv.playState == 3)  Player.fullScreen = 'true';
												 wmv.settings.setMode("autoRewind","true");
                         if(oPLAYCOUNT == 0 && oAUTOSTART == true) wmv.settings.setMode("loop","true");
												 else wmv.settings.setMode("loop","false");
                         //wmv.settings.setMode("showFrame","true");
               					 //wmv.settings.setMode("shuffle","false");
											
											}
	
                 				if(window.addEventListener){ // Mozilla, Netscape, Firefox 
                 							wmv.parentNode.addEventListener('DoubleClick',  function(){   if (wmv.playState == 3)  wmv.fullScreen = 'true';     }, false);
															wmv.parentNode.addEventListener('MediaChange', function(){   if (wmv.playState == 3)  wmv.fullScreen = 'true';     }, false);
															wmv.parentNode.addEventListener('PlayStateChange', function(){   if (wmv.playState == 3 ) { try{document.getElementById("playerBigButton").style.visibility="hidden";} catch(x){}   try{document.getElementById("pulser").style.visibility="hidden";} catch(x){}          }     }, false);
															wmv.parentNode.addEventListener('PlayStateChange', function(){   if (wmv.playState == 8 ) { try{document.getElementById("playerBigButton").style.visibility="visible";} catch(x){}   }    }, false);
														 } 
 												else { // IE
                             	wmv.attachEvent('DoubleClick', function(){   if (wmv.playState == 3)  wmv.fullScreen = 'true';    });
															wmv.attachEvent('PlayStateChange', function(){   if (wmv.playState == 3 ) { try{document.getElementById("playerBigButton").style.visibility="hidden";} catch(x){} try{document.getElementById("pulser").style.visibility="hidden";} catch(x){}     }    });
															wmv.attachEvent('PlayStateChange', function(){   if (wmv.playState == 8 ) try{document.getElementById("playerBigButton").style.visibility="visible";} catch(x){}   });
														}
											
											//if(oAUTOSTART=="false"){ alert(oAUTOSTART);  }
                     //alert(wmv.id);
										 return wmv;
}//End of function fb_playWMV()
//****************************************************************************************************************************************//
//                   Q U I C K T I M E   M O V I E     C O N T R O L L E R S
//****************************************************************************************************************************************//
/*
qtPlayer.Play() 
qtPlayer.Stop() 
qtPlayer.SetControllerVisible(1 or 0)
qtPlayer.rewind() 
qtPlayer.SetRate(rate)  1 = normal rate;  2+ = quickspeed;  0= paused; -1... = backwards 
qtPlayer.SetTime(time)  For .mov files time is indicated by number of frames- for example for a 6 frame per second movie setTime(30) would take it to 30th frame or 5 seconds. For sound the time is indicated in miliseconds - for example, 22000 (22x1000) would take it to 22th second.  ** note this setting is different than the hour:minute:second:frame notation used in the embed tag. 
qtPlayer.SetVolume(vol) 
qtPlayer SetStartTime(time) sets start time for looping using hours:minutes:seconds:frame notation 
qtPlayer. SetEndTime(time) sets end time for looping using hours:minutes:seconds:frame notation 
qtPlayer.SetIsLooping(boolean loop)  - loops
*/
//****************************************************************************************************************************************//
//                  Q U I C K T I M E   M O V I E     C O N T R O L L E R S
//****************************************************************************************************************************************//
//Plays all QT movies with tag name "qtPlayer" on specified host
function playALLQT(host){
host = eval(host);
var topDocAll = host.getElementsByTagName('*'); 	
	for(cntr=0; cntr <= topDocAll.length - 1; cntr++){
			  if( topDocAll[cntr].tag == "qtPlayer")
				{
						  topDocAll[cntr].SetVolume(0); 
						 //topDocAll[cntr].Play();
			  }
  } 
}
//
//****************************************************************************************************************************************************************
//fb_playQT() Version No.8
//
/*
SCALE is either TOFIT, ASPECT or a number. By default the value of SCALE is 1. 
If set to TOFIT, the movie is scaled to fit the embedded box as specified by the HEIGHT and WIDTH attributes. 
If this is set to ASPECT, the movie will scale to fit the embedded box while maintaining the aspect ratio. 
If this is set with a number, the movie will be scaled by that number (e.g. 1.5).
*/
function fb_playQT(ID, host, oTARGET, oQTvideo_1, oQTvideo_2, oCONTROLLER, oAUTOSTART, oBGCOLOR, oLOOP, oSCALE, oWIDTH, oHEIGHT, oLEFT, oTOP ){			 
			 host = eval(host);
			 var o  = '<OBJECT id= ';
						o += ID ;
					  o += ' codebase="http://www.apple.com/qtactivex/qtplugin.cab"  ';
						o += ' width= ';
					  o += oWIDTH;
					  o += '  height= ';
					  o += oHEIGHT;
					  o += '  classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
					  o += ' TYPE="video/quicktime" > \n';
					  o += '<param name="SRC" value= ';
					  o += oQTvideo_1;
						o += ' />\n<param name="bgcolor" value=';
					  o += oBGCOLOR;
						o += ' />\n<param name="kioskmode" value=';
					  o += "false";
						o += ' />\n<param name="showlogo" value=';
					  o += "true";
					  o += ' />\n<param name="controller" value=';
					  o += oCONTROLLER;
					  o += ' />\n<param name="autoplay" value=';
					  o += oAUTOSTART;
					  o += ' />\n<param name="loop" value=';
						o += oLOOP;
						o += ' />\n<param name="EnableJavaScript" value= "true" />\n ';
            o += '<param name="scale" value= ';
						o += oSCALE;
						o += ' /><EMBED name=';
						o += ID;
						o += ' SRC= ';
						o += oQTvideo_1;
						o += ' cache="true"';
						o += ' HREF=';
						o += oQTvideo_2;
						o += '  target=';
						o += oTARGET;
						o += ' width= ';
					  o += oWIDTH;
					  o += '  height=';
					  o += oHEIGHT;
					  o += ' type ="application/x-quicktime-media-link" ';
						o += ' controller= ';
						o += oCONTROLLER;
						o += ' autoplay = ';
						o += oAUTOSTART;
						o += ' scale =';
						o += oSCALE;
						o += ' loop = ';
						o += oLOOP;
						o += '  bgcolor=';
						o += oBGCOLOR;
						o += '  pluginspage="http://www.apple.com/quicktime/download/">';
						o += ' </EMBED></OBJECT>';
				
				var  sp = host.createElement("SPAN");	
						 sp.innerHTML = o;
						 
					 var _qt = host.body.appendChild(sp);
					 _qt.style.position = 'absolute';
					 _qt.style.left = oLEFT + '';
					 _qt.style.top = oTOP + '';
					 _qt.width = oWIDTH;
					 _qt.height = oHEIGHT;
           var qt = _qt.childNodes[0];
					
					return qt;
}//End of function fb_playQT()
//****************************************************************************************************************************************************************
//fb_showPIC() Version No.8
//
function fb_showPIC(host, path, oORIGINALSIZE, oWIDTH, oHEIGHT, oLEFT, oTOP){
				oHost = eval(host); 		 
						 _Pic=oHost.createElement("IMG");
						 _Pic.src = path;
						 eval(_Pic);
						//This line overrides function oWidth,oHeight and outputs images with original size
						if(oORIGINALSIZE){
															oWIDTH = _Pic.width;
					  									oHEIGHT = _Pic.height;	
														}
						else {
								 						 _Pic.width = oWIDTH;
					  								 _Pic.height = oHEIGHT;
								 }
         		_Pic.style.position='absolute';
            _Pic.style.left = oLEFT + '';
            _Pic.style.top = oTOP + '';
     			  Pic = oHost.body.appendChild(_Pic);
		  
			return Pic;
}//End of function fb_showPIC()
//****************************************************************************************************************************************************************
//fb_showPICs() Version No.8
function fb_showPICs(oImgID, host, pathArray, oMultiple, oBorderWidth, oBorderStyle, oBorderColor, oBackgroundColor, oPadding, oBorderRadius1, oBorderRadius2, oBorderRadius3, oBorderRadius4, oWIDTH, oHEIGHT, oLEFT, oTOP){
				oHost = eval(host); 		 
					   var spn = oHost.createElement("SPAN");
						 spn.id = "spn_id";
						 spn.style.align = "center";
						 spn.style.position="absolute";
						 spn.style.zIndex=21;
						 spn.style.top = oTOP ;
						 spn.style.left= oLEFT;
						 if(browser != "IE") spn.style.width = eval(oWIDTH) - oBorderWidth * 2 - oPadding * 2 ; //Changed in ver13
						 else  spn.style.width = eval(oWIDTH) - oBorderWidth * 2 - oPadding * 3 ;
						 if(browser != "IE") spn.style.height = eval(oHEIGHT) - oBorderWidth * 2 - oPadding * 2 ;
						 else  spn.style.height = eval(oHEIGHT) - oBorderWidth * 2 - oPadding * 3 ;
						 
						    //Changed in ver13
								var s1 = "<div id="+oImgID+"  align='center'  style=' height:"+ (eval(oHEIGHT) - oBorderWidth * 2 - oPadding * 2 ) +"px;  width:"+ (eval(oWIDTH) - eval(oBorderWidth) * 2 - oPadding * 3 )     + "px;  font-weight:normal; color:#00000F;  padding-left:"+oPadding+";  padding-top:"+oPadding+";  padding-bottom:"+oPadding+";   padding-right:1;            background-color:"+  oBackgroundColor + ";    border:"+oBorderWidth+" "+oBorderStyle+" "+oBorderColor+";   -webkit-border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px;  border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px;  -moz-border-radius:"+oBorderRadius1+"px "+oBorderRadius2+"px "+oBorderRadius3+"px "+oBorderRadius4+"px;  scrollbar-face-color:"+oBorderColor+"; scrollbar-highlight-color:"+oBorderColor+";'  >\n";
								spn.innerHTML = s1;	
															
                 					   var spin = oHost.createElement("SPAN");
                 						 spin.id = "spin_id";
                 						 spin.style.align = "center";
                 
                   						 spin.style.position="absolute";
                   						 spin.style.zIndex=21;
                   						 spin.style.top = oPadding;
                   						 spin.style.left= 0;
															 if(browser != "IE") spin.style.width = oWIDTH - oBorderWidth * 2 - oPadding * 4; //Changed in ver13
															 else spin.style.width = oWIDTH - oBorderWidth * 3 - oPadding * 3; //Changed in ver13
						 									 spin.style.height = oHEIGHT - oBorderWidth * 2 - oPadding * 4; //Changed in ver13
															 spin.style.padding = oPadding;
															 spin.style.overflow = "auto";
														
															for(i=0; i < pathArray.length; i++){
     												          var image = document.createElement("IMG");
																			image.id = "img_" + i;
																			image.align = "middle";
																			if(i!=0) image.vspace = 20;
																			image.hspace = 1;
																			var PIC = spin.appendChild(image);
																	    PIC.src = pathArray[i];
																			PIC = eval(PIC);
																			if(browser != "IE") PIC.width = oWIDTH - oBorderWidth * 2 - oPadding * 2 - 50 ; //Changed in ver13
																			else  PIC.width = oWIDTH - oBorderWidth * 4 - oPadding * 4 - 50 ; //Changed in ver13
															}
    						
    						spn.childNodes[0].appendChild(spin); 
								//var s3 ="</div></div>\n";  //Removed in ver13
								//spn.innerHTML += s3;
								//var Pic = oHost.body.appendChild(spn);
								var Picula = document.body.appendChild(spn); 
								Picula.id = "Pic_ID";
								//Picula.style.width = spn.style.width- oBorderWidth * 2 - oPadding * 2; //Removed in ver13
								//Picula.style.height = spn.style.height- oBorderWidth * 2 - oPadding * 2 ;
									 
							if(window.addEventListener){ // Mozilla, Netscape, Firefox
									Picula.addEventListener('mousedown',  dragScroll_EventHandler,  false); }
							else { // IE
									Picula.attachEvent('onmousedown',dragScroll_EventHandler ); }
					
						
			     return Picula;
}//End of function fb_showPIC()
//****************************************************************************************************************************************************************
//                                                               E V E N T    H A N D L E R S
//****************************************************************************************************************************************************************
//
//****************************************************************************************************************************************************************
var start_posY = 0;
var end_posY = 0;
function dragScroll_EventHandler(e){
 if (e == null) {   e = window.event;  }
 
		 //var cursorType = e.target != null ?'-moz-grabbing':'hand';  
		 var target = (e.target != null) ? e.target : e.srcElement;     
		 if (target.nodeType == 3) // defeat Safari bug
		 target = target.parentNode; 
		 target.ondragstart = function(){ start_posY = e.clientY; }
		 target.ondrag = function(){  end_posY = e.clientY;  (end_posY <= start_posY)?  target.parentNode.scrollTop += (start_posY - end_posY)/2:target.parentNode.scrollTop -= (end_posY - start_posY)/2       	}		
}
//Close_x_onmouseover_eventhandler Version No.1
//
function Close_x_onmouseover_eventhandler(evt)
{
		if (evt == null) { evt = window.event }
		if(evt['target']){
		  if (evt['target'].nodeType == 3) // defeat Safari bug
		   evt['target'] = evt['target'].parentNode;
			 evt['target']['oImage'].style.cursor = 'pointer';
			 evt['target']['objtitleLabel'].style.opacity = 1;
			 evt['target']['baseIMG'].style.opacity = 0.5;
			 evt['target']['oImage'].style.opacity = 1;
		}
		else if(evt['srcElement']){
		evt['srcElement']['objtitleLabel'].style.filter = "alpha(Opacity=100)";
		evt['srcElement']['baseIMG'].style.filter = "alpha(Opacity=50)";
		evt['srcElement']['oImage'].style.filter = "alpha(Opacity=100)";
		evt['srcElement']['oImage'].style.cursor = 'pointer';
		//evt['srcElement']['oImage'].filters.invert.enabled='true';
		}
}//End of function Close_x_onmouseover_eventhandler
//****************************************************************************************************************************************************************
//Close_x_onmouseout_eventhandler Version No.1
//
function Close_x_onmouseout_eventhandler(evt)
{
		if (evt == null) { evt = evt || window.event } 
		if(evt['target']){
		  if (evt['target'].nodeType == 3) // defeat Safari bug
		   evt['target'] = evt['target'].parentNode;
			evt['target']['oImage'].style.opacity = 0.5;
			evt['target']['oImage'].style.cursor = 'arrow';
		}
		else if(evt['srcElement']){
			 evt['srcElement']['oImage'].style.cursor = 'arrow';
			}
}//End of function Close_x_onmouseout_eventhandler
//****************************************************************************************************************************************************************
//Close_x_onclick_eventhandler Version No.1
//
function Close_x_onclick_eventhandler(evt)
{
//alert("In transclose_x_onclick");
//Ie - srcElement  Mozilla - target
  if (!evt) { evt = evt || window.event } 
	if (evt.target) targ = evt.target;
	else if (evt.srcElement) targ = evt.srcElement;
	    //alert("In here: targ:    "+ targ); 
	if (targ.nodeType == 3) // defeat Safari bug
		targ = targ.parentNode;
		if(targ){
		 if(targ._type == 'close')  {  
				 try{  targ.hostObject.body.removeChild(targ.transObject);  targ.transObject = null;  targ.oImage = null;   /* window.parent.frames['MEDIA'].location.replace('Media.html'); */  } 
				 catch(x){    targ._Object = null;   targ.transObject = null;  targ.oImage = null;   }
			}
		 if(targ._type == 'dialogClose')  {  
				 try{   
				       
							 if(browser!="IE") { fadeoutDialog.speed = 10;  fadeoutDialog.finalOpacity = 0;  fadeoutDialog.currentOpacity = 0.5;    fadeoutDialog.init(targ.transObject.id,targ.transObject,targ.objectToShow,targ.objtitleLabel, targ.oImage, targ.baseIMG, targ.topMin, targ.leftMin   ); } 
						   else if(browser=="IE") { fadeoutDialog.speed = 10;  fadeoutDialog.finalOpacity = 0;  fadeoutDialog.currentOpacity = 50;  fadeoutDialog.init(targ.transObject.id,targ.transObject,targ.objectToShow,targ.objtitleLabel, targ.oImage, targ.baseIMG, targ.topMin, targ.leftMin   ); } 
							 else                   { fadeoutDialog.speed = 10;  fadeoutDialog.finalOpacity = 0;  fadeoutDialog.currentOpacity = 0.5;    fadeoutDialog.init(targ.transObject.id,targ.transObject,targ.objectToShow,targ.objtitleLabel, targ.oImage, targ.baseIMG, targ.topMin, targ.leftMin  ); } 
							}
				 catch(x){alert(x);  targ.transObject.parentNode.removeChild(targ.transObject);   targ._Object = null;   targ.transObject = null;  targ.oImage = null;   }
			}
		}//if(targ
}//End of function Close_x_onclick_eventhandler
//****************************************************************************************************************************************************************
//onmousemoveHandler Version No.1
//
  var savedTarget = null;
	var dragOK = false; 
	var DialogLeft = 0;
	var savedDialogLeft = 0;
	var DialogTop = 0;
	var savedDialogTop = 0;
  var offsX = 0;
  var offsY = 0;
	function onmousemoveHandler(e){     
	 //cancelOld(e);
	 if (e == null) { e = window.event }       
	 if (e.button<=1&&dragOK){ 
//	  if(e['target']) 	{        
	 		 var posX = e.target != null ?  e.clientX : e.clientX + document.body.scrollLeft	+ document.documentElement.scrollLeft;
	 		 var posY = e.target != null ?  e.clientY : e.clientY + document.body.scrollTop	+ document.documentElement.scrollTop;
//		}
	 if(e['srcElement']){
	 		//In firefox it works like this- surprise, surprise
	 		//var posX =  e.clientX + document.body.scrollLeft	+ document.documentElement.scrollLeft;
	 		//var posY =  e.clientY + document.body.scrollTop	+ document.documentElement.scrollTop;
		}
	 //DialogLeft = posX - offsX;
	 //DialogTop = posY - offsY;
	 savedTarget.transObject.style.left = (posX - offsX) + '';    
   DialogLeft = savedTarget.transObject.style.left;
	 savedTarget.transObject.style.top = (posY - offsY) + ''; 
	 DialogTop = savedTarget.transObject.style.top;
   
	 return false; 
     }   
}//End of function onmousemoveHandler   
//****************************************************************************************************************************************************************
//onmouseupHandler Version No.1
//	 
function onmouseupHandler(e) {      
	 //cancelOld(e);
	 if (e == null) {   e = window.event;  } 
	// else 
	//document.onmousemove=null;      
	 //document.onmouseup=null;      
	 //savedTarget.style.cursor=orgCursor;
 	 dragOK=false;   
}//End of function onmouseupHandler  
//****************************************************************************************************************************************************************
//dragHandler Version No.1
//	 
	  function dragHandler(e){     
		 
		 if (e == null) {   e = window.event;  }
		 cancelOld(e); 
		 var htype= e.target != null ?'-moz-grabbing':'move';  
		 var target = e.target != null ? e.target : e.srcElement;     
		 if (target.nodeType == 3) // defeat Safari bug
		 target = target.parentNode; 
		orgCursor=target.style.cursor; 
		//if (target._type  == "dragBar") {         
			savedTarget=target;                
			savedTarget.style.position = "absolute";
			target.style.cursor=htype;         
			dragOK=true;
			//Added for ver13 
			if( browser != "Opera") {      
			    offsX =  e.target != null ? e.layerX : e.offsetX;
			    offsY =  e.target != null ? e.layerY : e.offsetY;
			}
			else if( browser == "Opera") {   
			    offsX = e.clientX-parseInt(target.transObject.style.left);         
			    offsY = e.clientY-parseInt(target.transObject.style.top); 
			}        
			document.onmousemove=onmousemoveHandler;         
			document.onmouseup=onmouseupHandler; 
			return false;      
		//}   
}//End of function dragHandler

//*********************************      General use   of    D R A G   Handler including Raphael SVG/VML objects     *********************************************

	function onmoveHandler(e){ 

	 if (e == null) { e = window.event } 
	 var target = (e.target != null)? e.target : e.srcElement;        
	 if (e.button<=1&&dragOK){ 
	 //cancelOld(e);
	 
	 var posX = e.clientX + document.body.scrollLeft || document.documentElement.scrollLeft;
	 var posY = e.clientY + document.body.scrollTop || document.documentElement.scrollTop;
     if(target.getAttribute("_isSVG") && browser != "IE"){
      	if(target.getAttribute("x")){ 
  				 savedTargetSVG.setAttribute("x",  posX - offsX    );
        	 savedTargetSVG.setAttribute("y",  posY- offsY    );
				 }else{
  				 savedTargetSVG.setAttribute("cx",  posX - offsX    );
        	 savedTargetSVG.setAttribute("cy",  posY- offsY    );
				 }
			}
			else{
           if(target.getAttribute("_isSVG")){
    	      savedTargetSVG.parentNode.style.left = posX - offsX;
    	      savedTargetSVG.parentNode.style.top = posY- offsY; 
            }
    			else {
    	      savedTargetSVG.style.left = posX - offsX;
    	      savedTargetSVG.style.top = posY- offsY; 
            }
			}


	 return false; 
     }   
}

//dragHandler Version No.1
//	 
	  function onmousedragHandler(e){     
		 
		 if (e == null) {   e = window.event;  }
		 cancelOld(e); 
		 var htype= (e.target != null )?'-moz-grabbing':'move';  
		 var target = (e.target != null)? e.target : e.srcElement;     
		 if (target.nodeType == 3) // defeat Safari bug
		 target = target.parentNode; 
		orgCursor=target.style.cursor; 
		                
			                
			target.style.position = "absolute";
			target.style.cursor=htype;         
			savedTargetSVG=target;
			dragOK=true;         
			//offsX =  e.target != null ? e.layerX : e.offsetX;
			//offsY =  e.target != null ? e.layerY : e.offsetY;

			if(target.getAttribute("_isSVG") && browser != "IE"){
      	  if(target.getAttribute("x")){ 
					  offsX = e.clientX-target.getAttribute("x");  
			      offsY = e.clientY-target.getAttribute("y");
					}else{
					  offsX = e.clientX-target.getAttribute("cx");  
			      offsY = e.clientY-target.getAttribute("cy");
					}
			}
			else{
        if(target.getAttribute("_isSVG") || target.style.left == null){
				 offsX = e.clientX-parseInt(target.parentNode.style.left);  
			   offsY = e.clientY-parseInt(target.parentNode.style.top);
        }
			 else {
				 offsX = e.clientX-parseInt(target.style.left);  
			   offsY = e.clientY-parseInt(target.style.top);
        }
			}
	
			document.onmousemove=onmoveHandler;         
			document.onmouseup=onmouseupHandler; 
			return false;      
 
}//End of function dragHandler


//****************************************************************************************************************************************************************
//cancelOld Version No.1
//	 
	function cancelOld(e) { 
 //if (e == null) {   e = window.event;  }
if (e.preventDefault) {   
  e.preventDefault();  e.stopPropagation();
	}	
}//End of function cancelOld	
//****************************************************************************************************************************************************************
//dragbar_onmouseover_eventhandler Version No.1
//	 
function dragbar_onmouseover_eventhandler(evt)
{
		//alert("dragbar_onmouseover_eventhandle");
		
		if (!evt) var evt = window.event;
		//alert("dragbar_onmouseover evt:   "+ evt); 
		if(evt['target']){
		  if (evt['target'].nodeType == 3) evt['target'] = evt['target'].parentNode; // defeat Safari bug
			var x = evt['target']['parentNode'].style.zIndex;
			//evt['target']['parentNode'].style.zIndex  = eval(x) + 1000;
			//alert("dragbar_onmouseover evt['target']['parentNode'].style.zIndex:   "+ evt['target']['parentNode'].style.zIndex); 
		}
		else if(evt['srcElement']){
			//alert(evt['srcElement']['oImage'].style.filter);
			//does not work here, does work in calling function 
      var x = evt['srcElement']['parentNode'].style.zIndex;
			//evt['srcElement']['parentNode'].style.zIndex = eval(x) +  1000;
		}
}//End of function dragbar_onmouseover_eventhandler
//****************************************************************************************************************************************************************
//dragbar_onmouseout_eventhandler Version No.1
//	 
var _isOutsideGrabBar = true;
function dragbar_onmouseout_eventhandler(evt, host,left,top,width,height)
{
						var posx = 0;
            var posy = 0;
            left=left;
            top=parseInt(top);
            width=parseInt(width);
            height=parseInt(height); 	 
						oHost = host;

	
  if (!evt) var evt = window.event;
	if(evt['target']){
		  if (evt['target'].nodeType == 3) // defeat Safari bug
		   evt['target'] = evt['target'].parentNode;
		            
								posx = evt.pageX;
            		posy = evt.pageY;
								var x = evt['target']['parentNode'].style.zIndex; 
								//evt['target']['parentNode'].style.zIndex = eval(x)-10000;
								evt['target']['parentNode'].style.zIndex =  highestzIndex + 1000;
	}		 
		 if(evt['srcElement']){ 
            		posx = evt.clientX + document.body.scrollLeft	+ document.documentElement.scrollLeft;
            		posy = evt.clientY + document.body.scrollTop	+ document.documentElement.scrollTop;
								var x = evt['srcElement']['parentNode'].style.zIndex;
								//evt['srcElement']['parentNode'].style.zIndex =  eval(x) -  1000;
			} 
//////////////////////////////  Calc mouseposition + return _isOutsideGrabBar   //////////////////////////////////////////////////////////		  
            if( posx > (left + 5) && posx < (left + width - 5) && posy > (top + 5) && posy < (top + height - 5)) { _isOutsideGrabBar = false; }
						else   { _isOutsideGrabBar = true; }
            	return	_isOutsideGrabBar;
}//End of function dragbar_onmouseout_eventhandler
//****************************************************************************************************************************************************************
//picMouseOutHandler Version No.1
//	 
function picMouseOutHandler(evt)
{
 		if (!evt) var evt = window.event;
		if(evt['target']){
		  if (evt['target'].nodeType == 3) // defeat Safari bug
		   evt['target'] = evt['target'].parentNode;
			//line removed in ver13 - evt['target']['parentNode'].style.zIndex = 0;
		}
		else if(evt['srcElement']){
				 savedDialogLeft = DialogLeft;
	       savedDialogTop = DialogTop;
				//alert(evt['srcElement']['parentNode'].style.zIndex);
				//line removed in ver13 - evt['srcElement']['parentNode'].style.zIndex = 0;
			} 
}//End of function picMouseOutHandler
//****************************************************************************************************************************************************************
//picMouseOverHandler Version No.1
//	 
function picMouseOverHandler(evt)
{
 		if (!evt) var evt = window.event;
		if(evt['target']){
		  if (evt['target'].nodeType == 3) // defeat Safari bug
		   evt['target'] = evt['target'].parentNode;
			evt['target']['parentNode'].style.zIndex = 100;
		}
		else if(evt['srcElement']){
				 savedDialogLeft = DialogLeft;
	       savedDialogTop = DialogTop;
				evt['srcElement']['parentNode'].style.zIndex = 100; 
   }
}//End of function picMouseOverHandler 
//Works with Mozilla and IE        ***************************              F  A  D  E O  U  T      F u n c t i o n s          ******************************************
//   USEAGE:
//       fadeout.speed = 50;
//       fadeout.finalOpacity = 0;
//       fadeout.currentOpacity = 100;
//       fadeout.init(obj);
 fadeout = {
    //speed : 50,
    //finalOpacity : 0,
    //currentOpacity : 70,
    elID : null,
    init : function(objectToFade) {
				fadeout.objectToFade = objectToFade;
				fadeout.oID = objectToFade.id;
	      if (!document.getElementById(fadeout.oID)) return;
            // fadeoutDialog.dofadeoutDialog();
						fadeoutInterval = setInterval('fadeout.dofadeout()',fadeout.speed);
          },
    dofadeout: function(objectToFade){
        if (fadeout.currentOpacity > fadeout.finalOpacity){
						if(browser=="IE") {
																		var newOpacity = fadeout.currentOpacity - 5;
																		fadeout.objectToFade.style.filter = "alpha(opacity =" + newOpacity + ")";
																	 }
						else  {//obj.style.opacity = "."+(newOpacity);
																	   var newOpacity = fadeout.currentOpacity - 0.05;
																		 fadeout.objectToFade.style.opacity=newOpacity;
																		}
						fadeout.currentOpacity = newOpacity;
        } 
				else {
 						   clearInterval(fadeoutInterval);
					   }	
			}
  }
//Works with Mozilla and IE        ***************************              F  A  D  E  I  N       F u n c t i o n s          ******************************************
//   USEAGE:
//       fadein.speed = 50;
//       fadein.finalOpacity = 100;
//       fadein.currentOpacity = 0;
//       fadein.init(obj);
 fadein = {
    //speed : 100,
    //finalOpacity : 0,
    //currentOpacity : 100,
    //elID : null,
    init : function(objectToFade) {
        fadein.oID = objectToFade.id;
					fadein.objectToFade = objectToFade;
		      if (!document.getElementById(fadein.oID)) return;
            // fadeinDialog.dofadeinDialog();
						fadeinInterval = setInterval('fadein.dofadein()',fadein.speed);
          },
    dofadein: function(objectToFade){
        if (fadein.currentOpacity < fadein.finalOpacity){
						if(browser=="IE") {
																		var newOpacity = fadein.currentOpacity + 5;
																		fadein.objectToFade.style.filter = "alpha(opacity =" + newOpacity + ")";
  																 }
						else  {  //fadeinDialog.obj.style.opacity = "."+(newOpacity);
																	   var newOpacity = fadein.currentOpacity + 0.05;
																		 fadein.objectToFade.style.opacity=newOpacity;
																		}
						fadein.currentOpacity = newOpacity;
        } 
				else {
 						   clearInterval(fadeinInterval);
             }
			}
  }
//Works with Mozilla and IE        ***************************    F  A  D  E O  U  T     D I A L O G      F u n c t i o n s    ***********************************
//fadeinDialog.speed = 50;  
//fadeinDialog.finalOpacity = 1;   
//fadeinDialog.currentOpacity = 0;    
//fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmin, xLEFTmin ); 
 fadeoutDialog = {
    //speed : 50,
    //finalOpacity : 0,
    //currentOpacity : 70,
    elID : null,
    init : function(el,obj,objectToShow,objtitleLabel,closeX,dragBar,topMin,leftMin) {
        fadeoutDialog.elID = el;
				fadeoutDialog.obj = obj;
				//fadeoutDialog.hostObject = hostObject;
				fadeoutDialog.objectToShow = objectToShow;
				fadeoutDialog.dragBar = dragBar;
				fadeoutDialog.objtitleLabel = objtitleLabel;
				fadeoutDialog.closeX = closeX;
				fadeoutDialog.topMin = topMin;
				fadeoutDialog.leftMin = leftMin;
	      if (!document.getElementById(el)) return;
            // fadeoutDialog.dofadeoutDialog();
						fadeoutDialogInterval = setInterval('fadeoutDialog.dofadeoutDialog()',fadeoutDialog.speed);
          },
    dofadeoutDialog: function(obj){
        if (fadeoutDialog.currentOpacity > fadeoutDialog.finalOpacity){
						if(browser=="IE") {
																		var newOpacity = fadeoutDialog.currentOpacity - 5;
																		fadeoutDialog.objectToShow.style.filter = "alpha(opacity =" + newOpacity + ")";
																	 }
						else  {//obj.style.opacity = "."+(newOpacity);
																	   var newOpacity = fadeoutDialog.currentOpacity - 0.05;
																		 fadeoutDialog.objectToShow.style.opacity=newOpacity;
																		}
						fadeoutDialog.currentOpacity = newOpacity;
        } 
				else {
 						   clearInterval(fadeoutDialogInterval);
							 if(fadeoutDialog.leftMin) fadeoutDialog.objectToShow.style.visibility = "hidden";
							 if(fadeoutDialog.leftMin) fadeoutDialog.obj.style.left = fadeoutDialog.leftMin;  
							 if(fadeoutDialog.topMin) fadeoutDialog.obj.style.top = fadeoutDialog.topMin; 
               if(fadeoutDialog.dragBar) fadeoutDialog.dragBar.style.height = "25px";
							 //if(fadeoutDialog.dragBar) fadeoutDialog.dragBar.src = "images/Google.jpg";
							 if(fadeoutDialog.dragBar) fadeoutDialog.dragBar.style.width = 32;
							 if(fadeoutDialog.closeX) fadeoutDialog.closeX.style.visibility = "hidden";
							 if(browser == "IE") {  
  							 									 if(fadeoutDialog.objtitleLabel) fadeoutDialog.objtitleLabel.style.filter = "alpha(opacity =100)";  
																	 if(fadeoutDialog.dragBar) fadeoutDialog.dragBar.style.filter = "alpha(opacity =20)"; 
																 }
							 else if(fadeoutDialog.dragBar) if(fadeoutDialog.objtitleLabel) {  fadeoutDialog.dragBar.style.opacity = 0.2;  fadeoutDialog.objtitleLabel.style.opacity = 1; }
					}	
			}
  }
//Works with Mozilla and IE        ***************************      F  A  D  E  I  N     D I A L O G      F u n c t i o n s   ************************************
//fadeinDialog.speed = 50;  
//fadeinDialog.finalOpacity = 1;   
//fadeinDialog.currentOpacity = 0;    
//fadeinDialog.init(transOBJ.id, transOBJ, oToShow, objtitleLabel, Close_x, baseIMG, xTOPmax, xLEFTmax ); 
 fadeinDialog = {
    //speed : 100,
    //finalOpacity : 0,
    //currentOpacity : 100,
    //elID : null,
    init : function(el,obj,objShow,objtitleLabel,closeX, dragBar,topMax,leftMax) {
        fadeinDialog.elID = el;
				fadeinDialog.obj = obj;
				fadeinDialog.objShow = objShow;
				fadeinDialog.dragBar = dragBar;
				fadeinDialog.topMax = topMax;
				fadeinDialog.leftMax = leftMax;
				fadeinDialog.closeX = closeX;
				fadeinDialog.objtitleLabel = objtitleLabel;
	      if (!document.getElementById(el)) return;
            // fadeinDialog.dofadeinDialog();
						fadeinDialogInterval = setInterval('fadeinDialog.dofadeinDialog()',fadeinDialog.speed);
          },
    dofadeinDialog: function(obj){
        if (fadeinDialog.currentOpacity < fadeinDialog.finalOpacity){
						if(browser == "IE") {
																		var newOpacity = fadeinDialog.currentOpacity + 5;
																		fadeinDialog.objShow.style.filter = "alpha(opacity =" + newOpacity + ")";
  																 }
						else  {  //fadeinDialog.obj.style.opacity = "."+(newOpacity);
																	   var newOpacity = fadeinDialog.currentOpacity + 0.05;
																		 fadeinDialog.objShow.style.opacity=newOpacity;
																		}
						fadeinDialog.currentOpacity = newOpacity;
        } 
				else {
 						   clearInterval(fadeinDialogInterval);
							 fadeinDialog.objShow.style.visibility = "visible";
							 if(fadeinDialog.leftMax) fadeinDialog.closeX.style.visibility = "visible";   
             }
			}
  }
//******************************************************************   A  N  O  T  H  E  R    F   A   D   E    ***************************************************
//  Usage:  fadeIn(_redDelta,_greenDelta,_blueDelta,_opacityDelta,_speed) 
//  _redDelta  				value=> 0-255   -->
//  _greenDelta  			value=> 0-255   -->
//  _blueDelta   			value=> 0-255   -->
//  _opacityDelta  		value=> 0-100   -->
//  _speed            value=> 0->5000 approx. -->
//<body onload="fadeIn(0,0,50,50,100);">
//****************************************************************************************************************************************************************
//Colour values between 0-255
var  redValue   = 256;
var  greenValue = 256;
var  blueValue  = 256;
var  opacityValue  = 100;
var  mozopacityValue  = 1.0;
var  _r = 0;
var  _g = 0;
var  _b = 0;
var  _o = 0;
var  _mozo = 0;
var timeO_I = null;
var timeO_O = null;
var mseconds = null;
var speed = null;
var redDelta = 0;
var greenDelta = 0;
var blueDelta = 0;
var opacityDelta = 0;
var colorHexNum = null;
function fadeOut(){
	 _r = 256 - redValue;
   _g = 256 - greenValue;
   _b = 256 - blueValue;
	 _o = 100 - opacityValue;
	 _mozo = 1 - mozopacityValue;
   
   var redHexNum   = DecToHex(_r);
   var greenHexNum = DecToHex(_g);
   var blueHexNum  = DecToHex(_b);
   
   colorHexNum = "#" + redHexNum + greenHexNum + blueHexNum;
   //window.status = "Background Colour:   " + colorHexNum;
   
   try{
	 		 document.body.style.background = colorHexNum;
		  }
catch(x){
				  return;
				//alert(colorHexNum);
      }
   
	 if(opacityDelta != 0 && document.body.filters) document.body.style.filter="alpha(Opacity="+_o+")";
   else if(opacityDelta != 0) { document.body.style.opacity=_mozo; }
   
	 redValue -= redDelta;
   greenValue -= greenDelta;
   blueValue -= blueDelta;
	 opacityValue -= opacityDelta;
	 mozopacityDelta = opacityDelta / 100;
	 mozopacityValue -= mozopacityDelta;
 
if(redValue == HexToDec('2F')) {  clearTimeout(timeO_0); return colorHexNum; }
   var func = function() {fadeIn(redDelta,greenDelta,blueDelta,opacityDelta,speed);   };
	 timeO_O = setTimeout(func,  1);
}
function fadeIn(_redDelta,_greenDelta,_blueDelta,_opacityDelta,_speed){
        redDelta = parseInt(_redDelta);
	 			greenDelta = parseInt(_greenDelta);
	 			blueDelta = parseInt(_blueDelta);
	 			opacityDelta = parseInt(_opacityDelta);
				speed = parseInt(_speed);
		 //mseconds = speed;
		timeO_I = setTimeout(fadeOut,speed); 
 
		if(redValue < HexToDec('C1') || greenValue < HexToDec('01') || blueValue < HexToDec('01')) {  clearTimeout(timeO_I); return colorHexNum; }
}
//****************************************************************************************************************************************************************
//////////////////////////////   2 digits only   DECIMAL Number to HEX   CONVERTER      //////////////////////
function DecToHex(strNum) {
     var base = strNum / 16;
     var rem = strNum % 16;
     base = base - (rem / 16);
     var baseS = MakeHex(base);
     var remS = MakeHex(rem);
     var hexnum = baseS + '' + remS;
     
     return hexnum;
}
//****************************************************************************************************************************************************************
function MakeHex(x) {
if((x >= 0) && (x <= 9))
    return x;
else {
        switch(x) {
          case 10: return "A"; 
          case 11: return "B";  
          case 12: return "C";  
          case 13: return "D";  
          case 14: return "E";  
          case 15: return "F";  
   			}
	   }
}
//****************************************************************************************************************************************************************
//////////////////////////////////////  2 digits only  HEX  to Number   CONVERTER   /////////////////////////
function HexToDec(numberS) {
 tens = MakeNum(numberS.substring(0,1));
    if(tens == 'X') {
    		return false;
    }
    ones = 0;
    if(numberS.length > 1) ones=MakeNum(numberS.substring(1,2));
        if(ones == 'X') {    return false;		}
    var decnum = (tens * 16) + (ones * 1);
    
    return decnum;
}
//****************************************************************************************************************************************************************
function MakeNum(str) {
  if((str >= 0) && (str <= 9))  return str;
    
		switch(str.toUpperCase()) {
        case "A": return 10;
        case "B": return 11;
        case "C": return 12;
        case "D": return 13;
        case "E": return 14;
        case "F": return 15;
        default:  alert('Number between 0 and 9 or a letter between A and F!');
        return 'X';
    }
}
//****************************************************************************************************************************************************************
/////////////////////////////////////// Alternative method /////////////////////////////////////////
/*Returns an integer converted from a string.
parseInt(numString, [radix]) 
Arguments
numString 
Required. A string to convert into a number. 
radix 
Optional. A value between 2 and 36 indicating the base of the number contained in numString. If not supplied, strings with a prefix of '0x' are considered hexadecimal and strings with a prefix of '0' are considered octal. All other strings are considered decimal. 
Remarks
The parseInt method returns an integer value equal to the number contained in numString. If no prefix of numString can be successfully parsed into an integer, NaN (not a number) is returned. 
parseInt("abc")     // Returns NaN.
parseInt("12abc")   // Returns 12.
You can test for NaN using the isNaN method.
*/
//////////////////////////////////////   END of CONVERTERS   ///////////////////////////////////////
//******************************************************************   A N   O  T  H  E  R    F   A   D   E    ***************************************************
//This function works with Mozilla only
opacity=0; //opacity of image
var increase=1; //increase opacity indicator
var decrease=0; //decrease opacity indicator
function fadeObject(obj){
    while(opacity < 60){  
			if (opacity < 0.3 && increase && browser != "IE")
      		   opacity += 0.05;
      else{
       		   increase=1;
      		   decrease=0;
      }
      if (opacity < 30 && increase && browser == "IE")
             opacity += 5;
      else {
      		 	 increase=1;
      		   decrease=0;
      }
      
      if (opacity > 0.6 && decrease && browser != "IE")
      	  opacity -= 0.05;
      else {
      		 increase=0;
      		 decrease=1;
      }
      if (opacity > 60 && decrease && browser == "IE")
      	  opacity -= 5;
      else{
       		 increase=0;
      		 decrease=1;
      }
      //alert(opacity);
			 if(browser == "IE" ) document.getElementById(obj).style.filter="alpha(opacity="+opacity+")";
			 else  document.getElementById(obj).style.opacity = opacity;
			 }
}
//***************************************************************          S  I  M  P  L  E    V  I  D  E  O  S     **********************************************
function loadVideo(clip, width, align) {    
var newVideo = document.createElement("IMG");        
       newVideo.src = clip;       
       newVideo.width= width;
       newVideo.align= align;
       newVideo.loop='1';
       newVideo.loopdelay='10';
       
       return newVideo;
}
//****************************************************************************************************************************************************************
function playVideo(newVideo) {    
   try
   {
      //Video=document.body.insertBefore(newVideo);      
     document.body.appendChild(newVideo); 
   }
  catch(x)
  {
    //newVideo=document.body.insertBefore('http://solcor.no-ip.com/images/pcs2000.asf');
    //document.location.reload();
  } 
      newVideo.start="fileopen";  
      //newVideo.start="mouseover";              
      newVideo.dynsrc = newVideo.dynsrc; // reload video 
      return 0;
}
//****************************************************************************************************************************************************************
function stopVideo(newVideo) {        
 try
  {
     document.body.removeChild(newVideo); 
  }
  catch(x)
  {
    document.location.reload();
  } 
     return 0; 
}
//****************************************************************************************************************************************************************
function scaleMe(o){
	 //for(y=0; y <= screen.availHeight; y += 30){
          y = screen.availHeight;
					x = y*ratio;
					Pic.width = x;
					Pic.height = y;
				o.resizeTo(x, y);
    //} 
 }
//****************************************************************************************************************************************************************
function popMe( path,w,h,i,title){
	      
				 Pic="Pic_" + i;
	       var trans="trans_" + i;
	   // if(ImLoad == 0){
				 trans = window.open("", "trans", "width="+w+", height="+h+",left=0,top=0,titlebar=no,statusbar=no,menubar=no,scrollbars=yes",false);
				 trans.document.write("<html><title>"+title+"-Photo-"+i+"</title><body  onUnload='this.document.body.removeChild(Pic); '></body  ></html>");
			   trans.document.body.leftMargin=0;
				 trans.document.body.topMargin=0;
				 //trans.onunload = fixIt();
			//} 
				 trans.focus();
	       //div=trans.document.createElement("DIV");
	       //div.align="center";
	       //trans.document.body.appendChild(div);
        // trans.onload = fixIton();
				 //trans.onunload = fixItun();
				 Pic=trans.document.createElement("IMG");
	       Pic.src=path;
	       //Pic.align="center";
	       Pic.width=Pic.width;
	       Pic.height=Pic.height;
				 Pic.style.cursor="url('http://192.168.0.6/images/magnifier.cur'),crosshair";
				 //Pic.style.cursor="pointer";
				 trans.document.body.appendChild(Pic);
         ratio = Pic.width / Pic.height;
				 Pic.height = screen.availHeight / 2;
				 Pic.width = ratio * screen.availHeight / 2;
	       //var wth = (screen.availWidth - w) / 2;
         //var hth = (screen.availHeight - h) / 2;
  			 trans.resizeTo(Pic.width,Pic.height+60);
         //trans.document.body.style.backgroundColor ='#30659F';
	       //Pic.onclick = scaleMe; 	
         Pic.onclick = function() {    y = screen.availHeight;   x = y*ratio;	Pic.width = x; Pic.height = y;	trans.resizeTo(x, y); Pic.style.cursor="default";   }
 
        //butt =trans.document.createElement("BUTTON");
	      //var buttext = trans.document.createTextNode("Zoom In");
	      //trans.document.body.appendChild(butt);
	      //butt.appendChild(buttext);
	      //butt.onclick = scaleMe;
     
				return trans;
}
//****************************************************************************************************************************************************************
function showMe( path,w,h,i,title){
	       
				 Pic="Pic_" + i;
				 Pic=document.createElement("IMG");
	       Pic.src=path;
	       Pic.style.left = 10;
				 Pic.style.top = 10;
				 Pic.style.position = 'absolute';
				 Pic.style.zIndex = 4;
				 //Pic.align="center";
	       Pic.width=Pic.width;
	       Pic.height=Pic.height;
				 ratio = Pic.width / Pic.height;
				 document.body.appendChild(Pic);
	       Pic.onclick = scaleMe;
				return Pic;
}
//****************************************************************************************************************************************************************
/*
function showAsIcon(obj, objWidth, objHeight, objShow, dragBar, title, path,w,h,left,top,i){
	       //obj = eval(obj);
				 Pic="Pic_" + i;
				 Pic=document.createElement("IMG");
	       Pic.src=path;
	       Pic.style.left = left;
				 Pic.style.top = top;
				 Pic.style.position = 'absolute';
				 Pic.style.zIndex = 4;
				 //Pic.align="center";
	       Pic.width=w;
	       Pic.height=h;
				 ratio = Pic.width / Pic.height;
				 Pic.title = title;
				 document.body.appendChild(Pic);
	       Pic.onclick = function(){  
						if(browser=="IE") {   			 	 obj.style.display = "block";  fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 100;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(obj.id, obj, objShow, dragBar); }
						else if(browser=="Firefox") {  obj.style.display = "block";  fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1.0;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(obj.id, obj, objShow, dragBar); } 
						else {	                       obj.style.display = "block";  fadeinDialog.speed = 50;  fadeinDialog.finalOpacity = 1.0;   fadeinDialog.currentOpacity = 0;    fadeinDialog.init(obj.id, obj, objShow, dragBar); } 
				 }
				
				return Pic;
}
*/
//*******************************************************    FLVPlayer.swf    F  L  A  S  H    P  L  A  Y  E  R       ********************************************


function fb_FLVPlayer(oID, host, oHTTP, oFlashVideo,  oAUTOPLAY, oALLOWFULLSCREEN,  oQUALITY, oALIGN, oBGCOLOR, oWIDTH, oHEIGHT, oLEFT, oTOP, oWMODE, oSCALE  ){			 
			 host = eval(host);
if(browser=="IE"){
		 		    var o  = '<OBJECT id= ';
						o += oID ;
					  //o += ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
						//o += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"';
						o += ' type ="application/x-shockwave-flash" ';
						o += ' width= ';
					  o += oWIDTH;
					  o += '  height= ';
					  o += oHEIGHT;
						o += ' align = ';
						o += oALIGN;
						o += '  data= ';
						o += 'FLVPlayer.swf?video=' + oHTTP + oFlashVideo + '&autoplay=' + oAUTOPLAY;
					  o += ' >\n<param name="movie" value=';
					  o += 'FLVPlayer.swf?video=' + oHTTP + oFlashVideo + '&autoplay=' + oAUTOPLAY;
						o += ' <param name="play" value=';
						o += '  true';
						o += ' />\n<param name="allowScriptAccess" value="sameDomain" />\n';
						o += ' <param name="quality" value=';
					  o += oQUALITY;
					  o += ' />\n<param name="allowFullScreen" value=';
					  o +=  oALLOWFULLSCREEN;
						o += ' />\n<param name="wmode" value=';
					  o +=  oWMODE;
						o += ' />\n<param name="bgcolor"  value=';
						o += oBGCOLOR;
						o += ' /></OBJECT> ';
}
else {
 						var o = '<EMBED name=';
						o += oID;
						o += ' SRC= ';
						o += 'FLVPlayer.swf?video=' + oHTTP + oFlashVideo + '&autoplay=' + oAUTOPLAY;
					  o += ' allowFullScreen =';
						o +=  oALLOWFULLSCREEN;
						o += ' flashvars="file= ' + oHTTP + oFlashVideo + '&autostart=true"';
						o += ' menu=false';
						o += ' scale= ';
						o +=  oSCALE;
						o += ' quality=';
						o +=  oQUALITY;
						o += ' width= ';
					  o += oWIDTH;
					  o += '  height=';
					  o += oHEIGHT;
					  o += ' type ="application/x-shockwave-flash" ';
						o += ' align = ';
						o += oALIGN;
						o += ' wmode = ';
					  o +=  oWMODE;
						o += ' bgcolor=';
						o += oBGCOLOR;
						o += '  allowScriptAccess = "sameDomain"';
						o += '  pluginspage="http://www.macromedia.com/go/getflashplayer">';
						o += ' </EMBED>';
}
				
				var  sp = host.createElement("SPAN");	
						 sp.innerHTML = o;
						 
					 var _flash = host.body.appendChild(sp);
					 _flash.style.position = 'absolute';
					 _flash.style.left = oLEFT + '';
					 _flash.style.top = oTOP + '';
					 _flash.width = oWIDTH;
					 _flash.height = oHEIGHT;
           var flash = _flash.childNodes[0];
					
					return flash;
}//End of function fb_FLVPlayer()


//**************************************************   using   FLVPlayer.swf    F  L  A  S  H    P  L  A  Y  E  R      *******************************************

function fb_FLV2Player(fID, fHost, fHTTP, fFlashVideo,  fAUTOPLAY, fALLOWFULLSCREEN,  fQUALITY, fALIGN, fBGCOLOR, fWIDTH, fHEIGHT, fLEFT, fTOP, fWMODE, fSCALE, fSTRETCH  ){			 
			 fHost = eval(fHost);
if(browser=="IE"){
		 		    var o  = '<OBJECT id= ';
						o += fID ;
					  o += ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
						o += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"';
						o += ' type ="application/x-shockwave-flash" ';
						o += ' width= ';
					  o += fWIDTH;
					  o += '  height= ';
					  o += fHEIGHT;
						o += ' align = ';
						o += fALIGN;
						o += '  data = ';
						o += 'FLVPlayer.swf?video=' + fHTTP + fFlashVideo + '&autoplay=' + fAUTOPLAY;
					  o += ' >\n<param name="movie" value=';
					  o += 'FLVPlayer.swf?video=' + fHTTP + fFlashVideo + '&autoplay=' + fAUTOPLAY;
						o += ' <param name="menu" value=true >\n';
						o += ' <param name="allowScriptAccess" value="sameDomain" />\n';
						o += ' <param name="quality" value=';
					  o +=  fQUALITY;
					  o += ' />\n<param name="allowFullScreen" value=';
					  o +=  fALLOWFULLSCREEN;
						o += ' />\n<param name="wmode" value=';
					  o +=  fWMODE;
						o += ' />\n<param name="bgcolor"  value=';
						o +=  fBGCOLOR;
						o += ' />\n<param name="scale"  value=';
						o +=  fSCALE;
						o += ' />\n<param name="stretching"  value=';
						o +=  fSTRETCH;
						o += ' /></OBJECT> ';
}
else {
 						var o = '<EMBED name=';
						o += fID;
						o += ' SRC= ';
						o += 'FLVPlayer.swf?video=' + fHTTP + fFlashVideo + '&autoplay=' + fAUTOPLAY;
					  o += ' allowFullScreen =';
						o +=  fALLOWFULLSCREEN;
						o += ' flashvars="file= ' + fHTTP + fFlashVideo + '&autostart = ' + fAUTOPLAY + '"';
						o += ' menu=true';
						o += ' scale= ';
						o +=   fSCALE;
						o +=' stretching= ';
						o +=  fSTRETCH;
						o += ' quality=';
						o +=  fQUALITY;
						o += ' width= ';
					  o += fWIDTH;
					  o += '  height=';
					  o += fHEIGHT;
					  o += ' type ="application/x-shockwave-flash" ';
						o += ' align = ';
						o += fALIGN;
						o += ' wmode = ';
					  o +=  fWMODE;
						o += ' bgcolor=';
						o += fBGCOLOR;
						o += '  allowScriptAccess = "sameDomain"';
						o += '  pluginspage="http://www.macromedia.com/go/getflashplayer">';
						o += ' </EMBED>';

}
				
				var  sp = fHost.createElement("SPAN");	
						 sp.innerHTML = o;
						 
					 var _flash = fHost.body.appendChild(sp);
					 _flash.style.position = 'absolute';
					 _flash.style.left = fLEFT + '';
					 _flash.style.top = fTOP + '';
					 _flash.width = fWIDTH;
					 _flash.height = fHEIGHT;
           var flash = _flash.childNodes[0];
					
					return flash;
}//End of function fb_FLV2Player()



//*************************************************   J W            F  L  A  S  H    P  L  A  Y  E  R      ******************************************************

function fb_JWPlayer(fID, fHost, fHTTP, fFlashVideo,  fAUTOPLAY, fALLOWFULLSCREEN,  fQUALITY, fALIGN, fBGCOLOR, fWIDTH, fHEIGHT, fLEFT, fTOP, fWMODE, fSCALE, fSTRETCH  ){			 
			 fHost = eval(fHost);
if(browser=="IE"){
		 		    o  = '<OBJECT id= ';
						o += fID ;
					  //o += ' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
						//o += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"';
						o += ' type ="application/x-shockwave-flash" ';
						o += 'bottom_caption = "Bottom Caption"';
						o += ' width= ';
					  o += fWIDTH;
					  o += '  height= ';
					  o += fHEIGHT;
						o += ' align = ';
						o += fALIGN;
						//o += '  data= ';
						//o += 'jw_player.swf';
					  o += ' >\n<param name="movie" value=';
					  o += 'jw_player.swf';
						o += ' />\n<param name="allowScriptAccess" value="sameDomain" />\n';
						o += ' <param name="flashvars" value="file=';
						o += fFlashVideo;
						o += '&image=';   // <param name="flashvars" value="file=video.mp4&image=preview.jpg" /> 
						o += fIMAGE;
						o += ' menu=false';
						o += ' scale= ';
						o +=  fSCALE;
						o +='&stretching=';
						o +=fSTRETCH;
						o += '" /> <param name="quality" value=';
					  o += fQUALITY;
					  o += ' />\n<param name="allowFullScreen" value=';
					  o +=  fALLOWFULLSCREEN;
						o += ' />\n<param name="wmode" value=';
					  o +=  fWMODE;
						o += ' />\n<param name="bgcolor"  value=';
						o += fBGCOLOR;
						o += ' /></OBJECT> ';
}
else {
 						o = '<EMBED name=';
						o += fID;
						o += ' src=jw_player.swf';
					  o += ' allowFullScreen =';
						o +=  fALLOWFULLSCREEN;
						o += ' quality=';
						o +=  fQUALITY;
						o += ' width= ';
					  o += fWIDTH;
					  o += '  height=';
					  o += fHEIGHT;
					  o += ' type ="application/x-shockwave-flash" ';
						o += ' align = ';
						o += fALIGN;
						o += '  bgcolor=';
						o += fBGCOLOR;
						o += '  allowScriptAccess = "sameDomain"';
						o += '  flashvars = "file=';
						o += fFlashVideo;
						o +=' &image=';
						o += fIMAGE;
						o +='&stretching=';
						o +=fSTRETCH;
						o += '"  pluginspage="http://www.macromedia.com/go/getflashplayer">';
						o += ' </EMBED>';
}
				
				var  sp = fHost.createElement("SPAN");	
						 sp.innerHTML = o;
						 
					 var _flash = fHost.body.appendChild(sp);
					 _flash.style.position = 'absolute';
					 _flash.style.left = fLEFT + '';
					 _flash.style.top = fTOP + '';
					 _flash.width = fWIDTH;
					 _flash.height = fHEIGHT;
           var flash = _flash.childNodes[0];
					
					return flash;

}//End of function fb_JWPlayer()



/*
Include - <script type="text/javascript" src="SWFObject_2_2.js"></script>

var fID =  "flashID_1";
var fHost = "document";
var fHTTP = "http://192.168.0.6/";  //Path to FLVPlayer.swf
var fFLVPLAYER = "jw_player.swf";
var fFlashVideo = "p31.flv";
var fVIDEOPANEL = "videoContent";
var fAUTOPLAY = false;
var fALLOWFULLSCREEN = true;
var fQUALITY = "high";
var fALIGN = "middle";
var fBGCOLOR = "#FF0000";
var fWIDTH = 320;
var fHEIGHT = 240;
var fLEFT = 100;
var fTOP = 50;
var fWMODE = "transparent";  //Or - "window"
var fIMAGE = "P0000001.jpg";
var fSCALE = "noscale";  // Or  - 
var fTHEME = "Youtube.swf"; 
var fREPEAT = true;
var fVOLUME = "50";
var fSCALEONRESIZE = "none";
var fTOPCAPTION = "Top Caption"; 
var fBOTTOMCAPTION = "Bottom Caption";

*/
function fb_Flash(fID, 
				 							//fHost, 
											fHTTP, 
											fFLVPLAYER,  
											fFlashVideo, 
											fVIDEOPANEL, 
											fAUTOPLAY, 
											fALLOWFULLSCREEN,  
											fQUALITY, 
											fALIGN, 
											fBGCOLOR, 
											fWIDTH, 
											fHEIGHT, 
											fLEFT, 
											fTOP, 
											fWMODE, 
											fIMAGE,
											fSCALE,
											fTHEME,
											fREPEAT,
											fVOLUME ,
											fSCALEONRESIZE,
											fTOPCAPTION,
											fBOTTOMCAPTION ){			 
			 
//fHost = eval(fHost);

//Video
var params = {  menu: "true",  allowScriptAccess: "sameDomain",   allowFullScreen: fALLOWFULLSCREEN,   wmode: fWMODE, scale: fSCALE  }; 
var flashvars = {  file: fFlashVideo, width: fWIDTH, height: fHEIGHT, theme: fTHEME,   repeat: fREPEAT , autostart: fAUTOPLAY, image: fIMAGE , volume: fVOLUME , scaleonresize: fSCALEONRESIZE,  top_caption: fTOPCAPTION,   bottom_caption: fBOTTOMCAPTION    }; 
var attributes = {  id: fID,   name: fID };   
     swfobject.embedSWF(fFLVPLAYER, fVIDEOPANEL, fWIDTH, fHEIGHT, "9.0.0", "expressInstall.swf", flashvars, params, attributes); 

//return swfobject;
}

/*
<div id="videoContent">       
Alternative content 
</div> 
*/

//*************************************************   E M B E D    ONLY    FLV F  L  A  S  H    P  L  A  Y  E  R      ***********************************************


function fb_FlashPlayer(fID, fHost, fHTTP, fFlashVideo,  fAUTOPLAY, fALLOWFULLSCREEN,  fQUALITY, fALIGN, fBGCOLOR, fWIDTH, fHEIGHT, fLEFT, fTOP, fWMODE, fSCALE  ){			 
			 
			 	 		fHost = eval(fHost);

 						var o = '<EMBED name=';
						o += fID;
						o += ' SRC= ';
						o += 'FLVPlayer.swf?video=' + fHTTP + fFlashVideo + '&autoplay=' + fAUTOPLAY;
					  o += ' allowFullScreen =';
						o +=  fALLOWFULLSCREEN;
						o += ' flashvars="file= ' + fHTTP + fFlashVideo + '&autostart = ' + fAUTOPLAY + '"';
						o += ' menu=true';
						o += ' scale= ';
						o +=   fSCALE;
						o += ' quality=';
						o +=  fQUALITY;
						o += ' width= ';
					  o += fWIDTH;
					  o += '  height=';
					  o += fHEIGHT;
					  o += ' type ="application/x-shockwave-flash" ';
						o += ' align = ';
						o += fALIGN;
						o += ' wmode = ';
					  o +=  fWMODE;
						o += ' bgcolor=';
						o += fBGCOLOR;
						o += '  allowScriptAccess = "sameDomain"';
						o += '  pluginspage="http://www.macromedia.com/go/getflashplayer">';
						o += ' </EMBED>';

				
				var  sp = fHost.createElement("SPAN");	
						 sp.innerHTML = o;
						 
					 var _flash = fHost.body.appendChild(sp);
					 _flash.style.position = 'absolute';
					 _flash.style.left = fLEFT + '';
					 _flash.style.top = fTOP + '';
					 _flash.width = fWIDTH;
					 _flash.height = fHEIGHT;
           var flash = _flash.childNodes[0];
					
					return flash;
}//End of function fb_playFlash()


//****************************************************************************************************************************************************************


   

