﻿document.write("  <div id='_1980outerdiv' style='position:absolute;display:none;z-index:17'>");
document.write("    <table id='Table2' border='0' cellpadding='0' cellspacing='0' width='10px' >");
document.write("     <tr>");
document.write("     <td width='11' height='11' valign='top' align='left' >");
document.write("           <img src='images/round/blue/8.gif' width='11' height='11' alt='tl'></td>");
document.write("       <td height='11' valign='top'  class='blue_top' >");
document.write("           </td>");
document.write("       <td width='13'  height='11'  valign='top' align='right'>");
document.write("        <img src='images/round/blue/2.gif' width='13' height='11' alt='tr'></td>");
document.write("       </tr>");
document.write("            <tr>");
document.write("            <td width='11' height='1' class='blue_left' > ");
document.write("            </td>");
document.write("            <td align=left>");
document.write("        <div id='_1980expandfrmdiv' style='display: none; overflow: hidden; width: 0px; height: 0px;background-color:#ea8006;'>");
document.write("            Loading...");
document.write("        </div>");
document.write("    </td>");
document.write("                 <td width='13' height='1' align=right class='blue_right'>");
document.write("            </td>");
document.write("            </tr>");
document.write("            <tr>");
document.write("            <td width='11' height='13' valign='bottom' align='left'>");
document.write("            <img src='images/round/blue/6.gif' width='11' height='13' alt='bl'></td>");
document.write("            <td  height='13' valign='bottom'  class='blue_bottom' >");
document.write("            </td>");
document.write("            <td width='13' height='13' valign='bottom' align='right'>");
document.write("            <img src='images/round/blue/4.gif' width='13' height='13' alt='br'></td>");
document.write("            </tr>");
document.write("    </table>");
document.write("    </div>");

//document.write("  <div id='_1980outerdiv' style='position:absolute;display:none;z-index:17'>");
//document.write("    <table id='Table2' border='0' cellpadding='0' cellspacing='0' width='10px' >");
//document.write("    <tr>");
//document.write("    <td width='11' height='11' valign='top' align=left >");
//document.write("        <img src='images/round/blue/8.gif' width='11' height='11' alt=''></td>");
//document.write("    <td height='11' valign='top'  style='background-color:#e5ebef;background-image: url(images/round_old/1.gif); background-position:top; background-repeat: repeat-x;'>");
//document.write("        </td>");
//document.write("    <td width='13'  height='11'  valign='top' align=right>");
//document.write("        <img src='images/round/blue/2.gif' width='13' height='11' alt=''></td>");
//document.write("    </tr>");
//document.write("    <tr>");
//document.write("    <td width='11' height='1' style='background-color:#e5ebef;background-image: url(images/round_old/7.gif); background-position: left; background-repeat: repeat-y;'>");
//document.write("    </td>");
//document.write("    <td align=left>");
//document.write("        <div id='_1980expandfrmdiv' style='display: none; overflow: hidden; width: 0px; height: 0px;background-color:white;'>");
//document.write("            Loading...");
//document.write("        </div>");
//document.write("    </td>");
//document.write("    <td width='13' height='1' align=right style='background-color:#e5ebef; background-position:right; background-image: url(images/round_old/3.gif); background-repeat: repeat-y;'>");
//document.write("    </td>");
//document.write("    </tr>");
//document.write("    <tr>");
//document.write("    <td width='11' height='13' valign='bottom' align=left>");
//document.write("        <img src='images/round/blue/6.gif' width='11' height='13' alt=''></td>");
//document.write("    <td  height='13' valign='bottom'  style='background-color:#e5ebef; ' >");
//document.write("         <img src='images/round_old/5.gif' width='100%' height='6' alt=''></td>");
//document.write("    <td width='13' height='13' valign='bottom' align=right>");
//document.write("        <img src='images/round/blue/4.gif' width='13' height='13' alt=''></td>");
//document.write("    </tr>");
//document.write("    </table>");
//document.write("    </div>");
        
        
        


/*************************************************************************************************
Usuage:
var CrossOpenobj= new CrossOpen();
CrossOpenobj.fadeobj=document.getElementById('Div tag name');

fadewinobj.startpoint  : this is optional value with in the range of (0 - 100)
fadewinobj.speed  : this is optional value with in the range of (1 - 100) Note : do not give 0, object wont be visible at all

-------------------
**************************************************************************************************/
function DialogWinResize()
{
      this.Object=null;
				this.OuterObject=null;
				//this.FrameContainer=null;
				this.startpoint=0;
				this.fadespeed=10;
				this.Animation=true;
				this.Height=200;
				this.Width=200;
				this.Left=0;
				this.Top=0;
				this.FrameObject;
				this.Invoke=function()
				{	
				    if(this.FrameObject!=null)
					{
					    
					    if(document.getElementById(this.FrameObject.id+'outerdiv'))
					    {
					        this.Object=document.getElementById(this.FrameObject.id+'expandfrmdiv')
				            this.OuterObject=document.getElementById(this.FrameObject.id+'outerdiv')
//				            this.FrameContainer=document.getElementById(this.FrameObject.id+'contentfrmdiv')
//				             var detect = navigator.userAgent.toLowerCase();
//                            if(detect.indexOf('msie')!=-1)
//                                this.Height=self.frames[this.FrameObject.id].document.body.scrollHeight;	
//                            else
//                                this.Height=self.frames[this.FrameObject.id].document.documentElement.offsetHeight;	
                            if(self.frames[this.FrameObject.id])
                                this.Height=self.frames[this.FrameObject.id].document.body.scrollHeight;	
                            else
                                this.Height=this.FrameObject.offsetHeight;
                            
                            this.Height=this.Height?this.Height-20:0;
                            this.Width=this.Object.offsetWidth;
                            /*
                             currentheight=this.OuterObject.offsetHeight-20
                                difheight=currentheight-this.Height
//                            alert(currentheight+' '+this.Height);
//                            this.Height=this.Height?this.Height-20:0;
//                            this.Width=this.Object.offsetWidth;
                            */
				            this.Object.style.height=this.Height+'px'
				            this.FrameObject.style.height=(this.Height+20)+'px'
				        }
				   }
		        }

}

function DialogWinClose()
{
                this.Object=null;
				this.OuterObject=null;
				this.FrameContainer=null;
				this.startpoint=0;
				this.fadespeed=10;
				this.Animation=true;
				this.Height=200;
				this.Width=200;
				this.Left=0;
				this.Top=0;
				this.FrameObject;
				this.Invoke=function()
				{	
				    if(this.FrameObject!=null)
					{
					    if(document.getElementById(this.FrameObject.id+'outerdiv'))
					    {
					        this.Object=document.getElementById(this.FrameObject.id+'expandfrmdiv')
				            this.OuterObject=document.getElementById(this.FrameObject.id+'outerdiv')
				            //this.FrameContainer=document.getElementById(this.FrameObject.id+'contentfrmdiv')
				           
				            this.FrameObject.style.height='0px';
				            this.FrameObject.src='about:blank';
				            if(!this.Animation)
				            {
				            
				                 this.FrameObject.style.display='none';
				                document.body.appendChild(this.FrameObject.id)
				               
				                return;
				            }
				            this.Height=this.Object.offsetHeight;
					        this.Width=this.Object.offsetWidth;
					        splitheight=this.Height/this.fadespeed;
					        splitwidth=this.Width/this.fadespeed;
                            split=splitheight>splitwidth?splitheight:splitwidth;
                            var step=1
                            for(var i=split-1;i>0;i--)
                            {
                                step++;
                                var pThis = this;
                                w=splitwidth*(i+1);
                                w=this.Width>w?w:this.Width;
                                h=splitheight*(i+1);
                                h=this.Height>h?h:this.Height;
                                var f="document.getElementById('"+this.Object.id+"').style.width='"+w+"px';document.getElementById('"+this.Object.id+"').style.height='"+h+"px';"
                                this.timerID =window.setTimeout(f,10*step);  
                            }
                            
                            var cls="document.getElementById('"+this.FrameObject.id+"').style.display='none';document.getElementById('"+this.OuterObject.id+"').style.display='none';document.body.appendChild(document.getElementById('"+this.FrameObject.id+"'));";
                            this.timerID =window.setTimeout(cls,10*step); 
                           
				        }
					}
				}
}
function DialogWinOpen()
			{
			 
				this.Object=null;
				this.OuterObject=null;
				//this.FrameContainer=null;
				this.startpoint=0;
				this.fadespeed=10;
				this.AutoHeight=false;
				this.Height=200;
				this.Width=200;
				this.Left=0;
				this.Top=0;
				this.FrameObject;
				
				this.Invoke=function()
				{	
				    if(this.FrameObject!=null)
					{
				        
				        if(!document.getElementById(this.FrameObject.id+'outerdiv'))
				        {
				            this.Object=document.getElementById('_1980expandfrmdiv')
				            this.OuterObject=document.getElementById('_1980outerdiv')
				            var clone=document.getElementById('_1980outerdiv').cloneNode(true);
				            this.Object.id=this.FrameObject.id+'expandfrmdiv'
				            this.OuterObject.id=this.FrameObject.id+'outerdiv'
				            document.body.appendChild(clone);
				        }
				        else
				        {
				            this.Object=document.getElementById(this.FrameObject.id+'expandfrmdiv')
				            this.OuterObject=document.getElementById(this.FrameObject.id+'outerdiv')				            
				        }
				        
				        this.OuterObject.style.zIndex= this.FrameObject.style.zIndex+1;          
				        
				        this.Object.innerHTML="Loading...."
					    if(this.AutoHeight==true)
					    {
					        var detect = navigator.userAgent.toLowerCase();
					         if(self.frames[this.FrameObject.id])
                             {  
                                if(detect.indexOf('msie')!=-1)
                                    this.Height=self.frames[this.FrameObject.id].document.body.scrollHeight;	
                                else
                                    this.Height=self.frames[this.FrameObject.id].document.documentElement.offsetHeight;					        
                             }
                             else
                                this.Height=this.FrameObject.offsetHeight;
					    }
					    
					    this.Height=this.Height?this.Height-20:0;
					    this.Width=this.Width-20;
					    
					    this.Object.style.width='0px';
                        this.Object.style.height='0px';   
                        this.OuterObject.style.left=this.Left+'px';
                        this.OuterObject.style.top=this.Top+'px';   
                        
                        if(this.OuterObject.style.display=='none')
							this.OuterObject.style.display='inline'				
					    if(this.Object.style.display=='none')
							this.Object.style.display='block'
											
						//if(this.Object.style.visibility=='hidden')
						//	this.Object.style.visibility='visible'		
					    splitheight=this.Height/this.fadespeed;
					    splitwidth=this.Width/this.fadespeed;
                        split=splitheight>splitwidth?splitheight:splitwidth;
                        for(var i=0;i<split;i++)
                        {
                            var pThis = this;
                            w=splitwidth*(i+1);
                            w=this.Width>w?w:this.Width;
                            h=splitheight*(i+1);
                            h=this.Height>h?h:this.Height;
                            var f="document.getElementById('"+this.Object.id+"').style.width='"+w+"px';document.getElementById('"+this.Object.id+"').style.height='"+h+"px';"
                            
                            this.timerID =window.setTimeout(f,10*i);  
                           
                        }
                        var pThis = this;
			            var f = function(){pThis.AfterExpand();}
			            this.timerID = window.setTimeout(f,10*split);
					}
				}
				
				
				this.AfterExpand = function()
				{
				    var height=this.Height>0?this.Height+20:0;
                    this.Object.innerHTML="";
                    var top=this.findPosY(this.OuterObject)+((this.findPosY(this.Object)-this.findPosY(this.OuterObject))/2);
                    var left=this.findPosX(this.OuterObject)+((this.findPosX(this.Object)-this.findPosX(this.OuterObject))/2);
                    this.FrameObject.style.visibility='visible';
                    this.Object.appendChild(this.FrameObject);
                    //this.FrameObject.style.zIndex=26 
                    //alert(this.FrameObject.style.zIndex)
                    //this.FrameObject.style.left=(left)+'px'
                    //this.FrameObject.style.top=top+'px'; 
                    //this.FrameObject.style.height=(this.Height-20)+'px'
                    //this.FrameObject.style.width=(this.Width)+'px'
				};
				
				this.findPosX = function(obj)
				{
				    var curleft = 0;
				    if (obj.offsetParent)
	                {
		                while (obj.offsetParent)
		                {
			                curleft += obj.offsetLeft
			                obj = obj.offsetParent;
		                }
	                }
	                else if (obj.x)
		                curleft += obj.x;
	                return curleft;
				};
				this.findPosY =function(obj)
                {
	                var curtop = 0;
	                if (obj.offsetParent)
	                {
		                while (obj.offsetParent)
		                {
			                curtop += obj.offsetTop;
			                obj = obj.offsetParent;
		                }
	                }
	                else if (obj.y)
		                curtop += obj.y;
	                return curtop;
                }	
			}
    

     