<!--
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
		
var	window_resize;	
	window_title = "Widnow Popup";
	font_face = "Verdana";
	font_color = "#FFFFFF";
	font_size = "2";
var crossobj;
var frmURL; 		
		
//var IE = document.all?true:false


var MouseD = "False"
var ResizeL = "False"
var iFrmHeight=0;
// Temporary variables to hold mouse x-y pos.s
var temp1X = 0
var temp1Y = 0
var check=0

var restore_top
var restore_left
var restore_width
var restore_height
var wresize
var status = ""
var popup_status
var popup_title
//var dragapproved1
var IE = document.all?true:false
var dragapproved;
// If NS -- that is, !IE -- then set up for mouse capture
if (!IE)
{
	document.captureEvents(Event.MOUSEMOVE)
	document.captureEvents(Event.MOUSEDOWN)
	document.captureEvents(Event.MOUSEUP)
}

// Set-up to use getMouseXY function onMouseMove
//document.onmousemove = getMouseXY;

function goResize()
{
	ResizeL = "True"
}

function getMouseDown()
{
  if (IE)
  {
	if (ResizeL == "True")
	{
		MouseD = "True";
		LayerWidth = parseInt(document.all.showimage.style.width)
		LayerHeight = parseInt(document.all.showimage.style.height)
		if (isNaN(LayerHeight))
		{
			LayerHeight = 0;
		}
		StartX = temp1X
		StartY = temp1Y
	}
  }else
  {
	if (ResizeL == "True")
	{
		MouseD = "True";
		LayerWidth = parseInt(crossobj.style.width)
		LayerHeight = parseInt(crossobj.style.height)
		if (isNaN(LayerHeight))
		{
			LayerHeight = 0;
		}
		StartX = temp1X
		StartY = temp1Y
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
  }
}

function getMouseUp()
{
	MouseD = "False";
	ResizeL = "False";
	dragapproved=false
	document.onmousemove=getMouseXY
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
//	stopns()
}

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e)
{
  if (IE)
  { // grab the x-y pos.s if browser is IE
    temp1X = event.clientX + document.body.scrollLeft
    temp1Y = event.clientY + document.body.scrollTop
	if (MouseD == "True")
	{
		EndX = temp1X
		EndY = temp1Y
		lwidth=(LayerWidth + (EndX - StartX))
		lheight=(LayerHeight + (EndY - StartY))
		
		if(lwidth<200) 
			lwidth=200		
		if(lheight<100)
			lheight=100				
		document.all.showimage.style.width = lwidth +'px'
		document.all.showimage.style.height = lheight +'px'
/*				
		document.all.showimage.style.width = (LayerWidth + (EndX - StartX))+'px'
		document.all.showimage.style.height = (LayerHeight + (EndY - StartY))+'px'
*/
		document.all.myIframe.style.height = '100%'
		if (document.getElementById("w_status").innerText != "Done")
		{
			document.getElementById("w_status").innerText = (popup_status.substr(0,parseInt(document.getElementById("showimage").style.width)/7) + "...")
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerText = popup_title
				}
		}
	}
  } else {  // grab the x-y pos.s if browser is NS
  			
  		temp1X = e.pageX + window.pageXOffset
	    temp1Y = e.pageY + window.pageYOffset
    //temp1X = e.pageX
    //temp1Y = e.pageY
	
	if (MouseD == "True")
	{
		EndX = temp1X
		EndY = temp1Y
		lwidth=(LayerWidth + (EndX - StartX))
		lheight=(LayerHeight + (EndY - StartY))
		
		if(lwidth<200) 
			lwidth=200		
		if(lheight<100)
			lheight=100				
		document.getElementById("showimage").style.width = lwidth +'px'
		document.getElementById("showimage").style.height = lheight +'px'
		if (document.getElementById("w_status").innerHTML != "Done")
		{
			document.getElementById("w_status").innerHTML = (popup_status.substr(0,parseInt(document.getElementById("showimage").style.width)/7) + "...")
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerHTML = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
		if (ns6)
		{
			document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
			document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
		}
	}
  }  
  // catch possible negative values in NS4
//  if (temp1X < 0){temp1X = 0}
//  if (temp1Y < 0){temp1Y = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  return true
}

//-->

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

//drag drop function for NS 4////
/////////////////////////////////

var dragswitch=0
var nsx
var nsy
var nstemp
var dragapproved1_g

function drag_dropns(name)
{
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e)
{
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e)
{
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}

function stopns()
{
	temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for ie4+ and NS6////
/////////////////////////////////


function drag_drop(e){
if (ResizeL == "True")
{
	getMouseXY(event)
	return;
}
//alert(dragapproved)
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
if (parseInt(crossobj.style.top) < 0)
{
	crossobj.style.top = 0;
}
if (parseInt(crossobj.style.left) < 0)
{
	crossobj.style.left = 0;
}
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}

function initializedrag(e){
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode!="BackCompat"? "documentElement" : "body"
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

if (dragapproved1_g == "true")
{
	dragapproved=true
}
if (ResizeL == "False")
{
	document.onmousemove=drag_drop
}else
{
	//document.onmousedown = getMouseDown
	document.onmousemove=getMouseXY
}

}
}

//document.onmouseup=new Function("dragapproved=false")
document.onmouseup = getMouseUp
document.onmousedown = getMouseDown
document.onmousemove=getMouseXY
//document.onmouseup = getMouseUp;

////drag drop functions end here//////

function hidebox()
{
if (ie4||ns6)
{
crossobj.style.visibility="hidden"
document.getElementById("myIframe").src=''
document.getElementById("showimage").style.top = '0px'
document.getElementById("showimage").style.left = '0px'
document.getElementById("showimage").style.width = '0px'
document.getElementById("showimage").style.height = '0px'
document.getElementById("showimage").style.visibility = 'hidden'

document.getElementById("restore").style.visibility="hidden"
document.getElementById("minimize").style.visibility = 'hidden'
document.getElementById("restoreup").style.visibility = 'hidden'

document.getElementById("resz").style.height = '0px'
document.getElementById("resz_td").style.height = '0px'
document.getElementById("resz_1").style.height = '0px'
document.getElementById("resz_1_td").style.height = '0px'
document.getElementById("resz").style.visibility="hidden"
document.getElementById("image").style.visibility="hidden"
document.getElementById("resz").style.visibility="hidden"
document.getElementById("resz_1_td").style.visibility="hidden"
//document.getElementById("resz").style.visibility="hide"
}
else
{ 
	if (ns4)
	{
		document.showimage.visibility="hide"
		document.restore.visibility = "hide"
	}
}
}
function SetCooKie(name,value)
{
	var argv=SetCooKie.arguments;
	var argc=SetCooKie.arguments.length
	var expires=(argc>2) ? argv[2] : null
	var path=(argc>3) ? argv[3] : null
	var domain=(argc>4) ? argv[4] : null
	var secure=(argc>5) ? argv[5] : false
	document.cookie=name + "=" +escape(value) + 
	((expires==null) ? "" :( ";expires=" + expires.toGMTString())) +
	((path==null) ? "" :( ";path=" + path)) +
	((domain==null) ? "" :( ";domain=" + domain)) +
	((secure==true) ? "; secure " : "")
}

function DeleteCookie (name,path,domain) 
{
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

/*function GetCookie(name)
{	
	var arg=name + "=" 
	var alen=arg.length
	var clen=document.cookie.length
	var i=0
	while((i<clen) && (i>0))
	{
		var j=i+alen
		if (document.cookie.substring(i,j)==arg)
		{
			//getCookieVal(j)
			return true;
		}
		i=document.cookie.indexOf(" ", i) + i;
		if ( i==0) break;
	}
	return false;
}*/

function GetCookie(name)
{	
	var arg=name + "=" 
	var alen=arg.length
	var clen=document.cookie.length
	var i=0,prev=0;next=0;
	var retval=false;
	while(true)
	{
		next=document.cookie.indexOf("; ", prev);
		if(next<=0)
		{
			var chkval=document.cookie.substring(prev,clen);
			var eqpos=chkval.indexOf("=", 0);
			if(eqpos>0)
			{
				if((chkval.substring(0,eqpos+1))==arg)
				{
					retval=true;
					break;
				}	
			}	
			break;				
		}
		if(next>0)
		{
			var chkval=document.cookie.substring(prev,next);
			var eqpos=chkval.indexOf("=", 0);
			if(eqpos>0)
			{
				if((chkval.substring(0,eqpos+1))==arg)
				{
					retval=true;
					break;
				}	
			}
			
		}
		prev=next+2;	
	}
	return retval;
}


function getCookieVal(offset)
{
	var endstr=document.cookie.indexOf(";",offset)
	if(endstr==-1)
	{
		endstr=document.cookie.length;
	}
	return unescape(document.cookie.substring(offset,endstr));
} 
function DelayShow()
{
	document.getElementById("showimage").style.visibility = 'visible';
/*	if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
	return;
*/

	document.getElementById("myIframe").src=frmURL
	document.getElementById("w_status").innerText = "Loading "+document.getElementById("myIframe").src
	popup_status = document.getElementById("w_status").innerText
	document.getElementById("w_status").innerText = (popup_status.substr(0,parseInt(document.getElementById("showimage").style.width)/7) + "...")
	document.getElementById("myIframe").style.visibility='visible';	
}

function WindowPopUp(height,width,top,left,windowresize,title,titlebgcolor,titleforecolor,dragapproved1,url,delayTime,showeverytime)
{
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
dragapproved1_g = dragapproved1
check_dapproved = dragapproved1
frmURL=url;
wresize = windowresize

document.getElementById("myIframe").style.scrollbarBaseColor='#FF0000'
//document.getElementById("myIframe").style.scrollbarBaseColor='#FF0000'
//document.getElementById("myIframe").style.changeScrollbarColor='#FF0000'

	var chkshow=false;
	if (!showeverytime)
	{
		chkshow=GetCookie('popalert');
		if (!chkshow)
			SetCooKie('popalert','added')		
	
	}
	else
	{
		DeleteCookie('popalert')
	}
	
	if(!chkshow)
	{
		if (ns4)
		{	
			templayer=document.layers[0]
			templayer.left=left
			templayer.top=top
			templayer.width=width
			templayer.height=height		
		}
		else if (ns6)
		{	
			document.getElementById("showimage").style.height=height
			document.getElementById("showimage").style.width =width
			document.getElementById("showimage").style.left =left
			document.getElementById("showimage").style.top =top				
			//alert(document.getElementById("dragbar").innerTEXT)
			document.getElementById("dragbar").innerHTML=title
			popup_title = document.getElementById("dragbar").innerHTML
			if (popup_title != "")
			{
				if ((popup_title.length * 10) > parseInt(document.getElementById("showimage").style.width))
				document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
			}
			if (titlebgcolor != "")
			{
				document.getElementById("dragbar").style.backgroundColor=titlebgcolor
				document.getElementById("dragbar").style.color = titleforecolor
//				document.getElementById("dragbar").style.width='80%'
				document.getElementById("dragbar1").style.backgroundColor=titlebgcolor
				document.getElementById("dragbar1").style.color = titleforecolor
			}
			
			if (windowresize == "false")
			{
//				document.getElementById("w_status").style.fontSize = '10px'
				document.getElementById("resz_1_td").style.visibility="hidden"
				document.getElementById("image").style.visibility="hidden"
/*				document.getElementById("resz").style.height = '0px'
				document.getElementById("resz_td").style.height = '0px'
			//	alert(document.getElementById("resz_1").style.height)
				document.getElementById("resz_1").style.height = '0px'
				document.getElementById("resz_1_td").style.height = '0px'
				document.getElementById("resz").style.visibility="hide" 
*/
			}
				//alert(url + "  src" + document.getElementById("myIframe").src)
				/*document.getElementById("myIframe").src=url
				document.getElementById("w_status").innerHTML = "Loading "+document.getElementById("myIframe").src
				popup_status = document.getElementById("w_status").innerHTML
				document.getElementById("w_status").innerHTML = (popup_status.substr(0,parseInt(document.getElementById("showimage").style.width)/7) + "...")*/
				
			}
		else
		{	
			document.getElementById("showimage").style.height=height + 'px'
			document.getElementById("showimage").style.width =width + 'px'
			document.getElementById("showimage").style.left =left + 'px'
			document.getElementById("showimage").style.top =top + 'px'
			document.getElementById("dragbar").innerText=title
			popup_title = document.getElementById("dragbar").innerText
			if (popup_title != "")
			{
				if ((popup_title.length * 10) > parseInt(document.getElementById("showimage").style.width))
				document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
			}
			
			if (titlebgcolor != "")
			{
				document.getElementById("dragbar").style.backgroundColor=titlebgcolor
				document.getElementById("dragbar").style.color = titleforecolor
				document.getElementById("dragbar1").style.backgroundColor=titlebgcolor
				document.getElementById("dragbar1").style.color = titleforecolor
			}
			if (windowresize == "false")
			{
				document.getElementById("resz_1_td").style.visibility="hidden"
				document.getElementById("image").style.visibility="hidden"
/*				document.getElementById("resz").style.height = '0px'
				document.getElementById("resz_td").style.height = '0px'
			//	alert(document.getElementById("resz_1").style.height)
				document.getElementById("resz_1").style.height = '0px'
				document.getElementById("resz_1_td").style.height = '0px'
				document.getElementById("resz").style.visibility="hidden"
*/
			}
		
		//	document.getElementById("table1").style.borderColor=bordercolor
			/*document.getElementById("myIframe").src=url
			document.getElementById("w_status").innerText = "Loading "+document.getElementById("myIframe").src
			popup_status = document.getElementById("w_status").innerText
			document.getElementById("w_status").innerText = (popup_status.substr(0,parseInt(document.getElementById("showimage").style.width)/7) + "...")*/
		}	
/*		if(dragapproved1=="true")	
			dragapproved=true
		else
			dragapproved=false

		//setTimeout("Delaynew()",(sec*1000));	
*/
		setTimeout("DelayShow()",(delayTime*1000));
	}	
}
//WindowPopUp(300,350,100,100,'true','TitleText','White','red','true','testfr.htm')


function at()
{
	if (IE == false)
	{
		document.getElementById("myIframe").height=crossobj.style.height
	}else
	{
		document.getElementById("myIframe").height='100%'
	}
}

function Delaynew()
{
	if (!ns4)
		document.getElementById("showimage").style.visibility="visible";
	else
		document.showimage.visibility="show";
	
	return;
}

function maximize_pop()
{
if (wresize == "true")
{
	document.getElementById("myIframe").style.visibility = 'visible';
	if (IE)
  	{
		if (status != "minimize")
		{
			restore_top = document.all.showimage.style.top
			restore_left = document.all.showimage.style.left
			restore_width = document.all.showimage.style.width
			restore_height = document.all.showimage.style.height
		}else
		{
			document.all.minimize.style.width = '21px'
			document.all.minimize.style.height = '21px'
			document.all.minimize.style.visibility = 'visible'
			
			document.all.restoreup.style.width = '0px'
			document.all.restoreup.style.height = '0px'
			document.all.restoreup.style.visibility = 'hidden'
			
			document.getElementById("resz").style.height = '12px'
			document.getElementById("resz_td").style.height = '12px'
		//	alert(document.getElementById("resz_1").style.height)
			document.getElementById("resz_1").style.height = '12px'
			document.getElementById("resz_1_td").style.height = '12px'
			document.getElementById("w_status").style.fontSize = '10px'
			document.getElementById("resz").style.visibility="visible"
		}
		
		document.all.showimage.style.top = '0px'
		document.all.showimage.style.left = '0px'
		document.all.showimage.style.width =  parseInt(document.body.clientWidth)+'px'
		document.all.showimage.style.height =  parseInt(document.body.clientHeight)+'px'
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.all.maximize.style.width = '0px'
		document.all.maximize.style.height = '0px'
		
		document.all.restore.style.width = '21px'
		document.all.restore.style.height = '21px'
		document.all.restore.style.visibility = 'visible'
		dragapproved1_g = 'false'

		document.getElementById("w_status").style.fontSize = '10px'
		document.getElementById("resz_1_td").style.visibility="hidden"
		document.getElementById("image").style.visibility="hidden"
		
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerText = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}else
	{
		if (status != "minimize")
		{
			restore_top = document.getElementById("showimage").style.top
			restore_left = document.getElementById("showimage").style.left
			restore_width = document.getElementById("showimage").style.width
			restore_height = document.getElementById("showimage").style.height
		}else
		{
			document.getElementById("minimize").style.width = '21px'
			document.getElementById("minimize").style.height = '21px'
			document.getElementById("minimize").style.visibility = 'visible'
			
			document.getElementById("restoreup").style.width = '0px'
			document.getElementById("restoreup").style.height = '0px'
			document.getElementById("restoreup").style.visibility = 'hidden'
			
			document.getElementById("resz").style.height = '12px'
			document.getElementById("resz_td").style.height = '12px'
		//	alert(document.getElementById("resz_1").style.height)
			document.getElementById("resz_1").style.height = '12px'
			document.getElementById("resz_1_td").style.height = '12px'
			document.getElementById("w_status").style.fontSize = '10px'
			document.getElementById("resz").style.visibility="visible"
		}
		document.getElementById("showimage").style.top = '0px'
		document.getElementById("showimage").style.left = '0px'
		document.getElementById("showimage").style.width =  (parseInt(window.innerWidth) - 16)+'px'
		document.getElementById("showimage").style.height =  (parseInt(window.innerHeight) - 37)+'px'
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.getElementById("maximize").style.width = '0px'
		document.getElementById("maximize").style.height = '0px'
		
		document.getElementById("restore").style.width = '21px'
		document.getElementById("restore").style.height = '21px'
		document.getElementById("restore").style.visibility = 'visible'
		dragapproved1_g = 'false'
		
		document.getElementById("w_status").style.fontSize = '10px'
		document.getElementById("resz_1_td").style.visibility="hidden"
		document.getElementById("image").style.visibility="hidden"
		document.getElementById("myIframe").height=crossobj.style.height
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerHTML = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
status = "maximize"
}
}

function restore_pop()
{
	document.getElementById("myIframe").style.visibility = 'visible';
	if(IE)
	{
		document.all.showimage.style.top = restore_top
		document.all.showimage.style.left = restore_left
		document.all.showimage.style.width =  restore_width
		document.all.showimage.style.height =  restore_height
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.all.maximize.style.width = '21px'
		document.all.maximize.style.height = '21px'
		
		document.all.restore.style.width = '0px'
		document.all.restore.style.height = '0px'
		document.all.restore.style.visibility = 'hidden'
		if (check_dapproved == "true")
			dragapproved1_g = 'true'

		if (wresize == "true")
		{
			document.getElementById("resz_1_td").style.visibility="visible"
			document.getElementById("image").style.visibility="visible"
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerText = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}else
	{
		
		document.getElementById("showimage").style.top = restore_top
		document.getElementById("showimage").style.left = restore_left
		document.getElementById("showimage").style.width =  restore_width
		document.getElementById("showimage").style.height =  restore_height
		document.getElementById("myIframe").height=crossobj.style.height
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.getElementById("maximize").style.width = '21px'
		document.getElementById("maximize").style.height = '21px'
		
		
		document.getElementById("restore").style.width = '0px'
		document.getElementById("restore").style.height = '0px'
		document.getElementById("restore").style.visibility = 'hidden'
		dragapproved1_g = 'true'

		if (wresize == "true")
		{
			document.getElementById("resz").style.height = '12px'
			document.getElementById("resz_td").style.height = '12px'
		//	alert(document.getElementById("resz_1").style.height)
			document.getElementById("resz_1").style.height = '12px'
//			document.getElementById("resz_1_td").style.height = '12px'
			document.getElementById("resz").style.visibility="visible"
			document.getElementById("resz_1_td").style.visibility="visible"
			document.getElementById("image").style.visibility="visible"
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerHTML = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
status = "restore"
}

function minimize_pop()
{
	if(IE)
	{
		if (status != "maximize")
		{
			restore_top = document.all.showimage.style.top
			restore_left = document.all.showimage.style.left
			restore_width = document.all.showimage.style.width
			restore_height = document.all.showimage.style.height
		}else
		{
			document.all.maximize.style.width = '21px'
			document.all.maximize.style.height = '21px'
	//		document.all.maximize.style.visibility = 'vsible'
			
			document.all.restore.style.width = '0px'
			document.all.restore.style.height = '0px'
			document.all.restore.style.visibility = 'hidden'
		}

		document.getElementById("resz").style.height = '0px'
		document.getElementById("resz_td").style.height = '0px'
	//	alert(document.getElementById("resz_1").style.height)
		document.getElementById("resz_1").style.height = '0px'
		document.getElementById("resz_1_td").style.height = '0px'
		document.getElementById("w_status").style.fontSize = '0px'
		document.getElementById("resz").style.visibility="hidden"
		document.getElementById("image").style.visibility="hidden"
		
		document.all.showimage.style.width = '200px'
		document.all.showimage.style.height = '20px'
		
		document.all.minimize.style.width = '0px'
		document.all.minimize.style.height = '0px'
		document.all.minimize.style.visibility = 'hidden'
		
		document.all.restoreup.style.width = '21px'
		document.all.restoreup.style.height = '21px'
		document.all.restoreup.style.visibility = 'visible'
		if (popup_title != "")
		{
				if ((popup_title.length * 12) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/12) + "...")
				}else
				{
					document.getElementById("dragbar").innerText = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}else
	{
		if (status != "maximize")
		{
			restore_top = document.getElementById("showimage").style.top
			restore_left = document.getElementById("showimage").style.left
			restore_width = document.getElementById("showimage").style.width
			restore_height = document.getElementById("showimage").style.height
		}else
		{
			document.getElementById("maximize").style.width = '21px'
			document.getElementById("maximize").style.height = '21px'
	//		document.all.maximize.style.visibility = 'vsible'
			
			document.getElementById("restore").style.width = '0px'
			document.getElementById("restore").style.height = '0px'
			document.getElementById("restore").style.visibility = 'hidden'
		}
		document.getElementById("image").style.visibility = 'hidden'
		document.getElementById("resz").style.height = '0px'
		document.getElementById("resz_td").style.height = '0px'
	//	alert(document.getElementById("resz_1").style.height)
		document.getElementById("resz_1").style.height = '0px'
		document.getElementById("resz_1_td").style.height = '0px'
		document.getElementById("w_status").style.fontSize = '0px'
		document.getElementById("image").style.visibility="hidden"

		//document.getElementById("resz").style.visibility="hidden"
		
		document.getElementById("showimage").style.width = '260px'
		document.getElementById("showimage").style.height = '0px'
		//alert(crossobj.style.height);
		iFrmHeight=document.getElementById("myIframe").height;
		document.getElementById("myIframe").height='0px';
		document.getElementById("myIframe").style.visibility = 'hidden'
		document.getElementById("minimize").style.width = '0px'
		document.getElementById("minimize").style.height = '0px'
		document.getElementById("minimize").style.visibility = 'hidden'
		
		document.getElementById("restoreup").style.width = '21px'
		document.getElementById("restoreup").style.height = '21px'
		document.getElementById("restoreup").style.visibility = 'visible'

		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerHTML = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
	document.getElementById("myIframe").style.visibility = 'hidden';
status = "minimize"
}

function restoreup_pop()
{
	document.getElementById("myIframe").style.visibility = 'visible';
	if(IE)
	{
		document.all.showimage.style.width =  restore_width
		document.all.showimage.style.height =  restore_height
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.all.minimize.style.width = '21px'
		document.all.minimize.style.height = '21px'
		document.all.minimize.style.visibility = 'visible'
		
		document.all.restoreup.style.width = '0px'
		document.all.restoreup.style.height = '0px'
		document.all.restoreup.style.visibility = 'hidden'
		if (check_dapproved == "true")
			dragapproved1_g = 'true'

		document.getElementById("resz").style.height = '12px'
		document.getElementById("resz_td").style.height = '12px'
	//	alert(document.getElementById("resz_1").style.height)
		document.getElementById("resz_1").style.height = '12px'
		document.getElementById("resz_1_td").style.height = '12px'
		document.getElementById("w_status").style.fontSize = '10px'
		document.getElementById("resz").style.visibility="visible"
		
		if (wresize == "false")
		{
			document.getElementById("resz_1_td").style.visibility="hidden"
			document.getElementById("image").style.visibility="hidden"
		}else
		{
			document.getElementById("resz_1_td").style.visibility="visible"
			document.getElementById("image").style.visibility="visible"
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerText = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerText = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}else
	{
		document.getElementById("image").style.visibility = 'visible'
		document.getElementById("showimage").style.width =  restore_width
		document.getElementById("showimage").style.height =  restore_height
		document.getElementById("myIframe").style.visibility = 'visible'
//		alert(document.all.maximize.src);
//		document.all.maximize.src = 'Mkt001HoverAdrestore.gif'
		document.getElementById("minimize").style.width = '21px'
		document.getElementById("minimize").style.height = '21px'
		document.getElementById("minimize").style.visibility = 'visible'
		document.getElementById("myIframe").height=iFrmHeight;
		document.getElementById("restoreup").style.width = '0px'
		document.getElementById("restoreup").style.height = '0px'
		document.getElementById("restoreup").style.visibility = 'hidden'
		dragapproved1_g = 'true'

		document.getElementById("resz").style.height = '12px'
		document.getElementById("resz_td").style.height = '12px'
	//	alert(document.getElementById("resz_1").style.height)
		document.getElementById("resz_1").style.height = '12px'
		document.getElementById("resz_1_td").style.height = '12px'
		document.getElementById("w_status").style.fontSize = '10px'
		document.getElementById("resz").style.visibility="visible"
		
		if (wresize == "false")
		{
			document.getElementById("resz_1_td").style.visibility="hidden"
			document.getElementById("image").style.visibility="hidden"
		}else
		{
			document.getElementById("resz_1_td").style.visibility="visible"
			document.getElementById("image").style.visibility="visible"
		}
		if (popup_title != "")
		{
				if ((popup_title.length * 10) >= parseInt(document.getElementById("showimage").style.width))
				{
					document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
				}else
				{
					document.getElementById("dragbar").innerHTML = popup_title
				}
//			document.getElementById("dragbar").innerHTML = (popup_title.substr(0,parseInt(document.getElementById("showimage").style.width)/10) + "...")
		}
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width = (parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height = (parseInt(document.getElementById("showimage").style.height) - 39)+'px'
	}
status = "restoreup"
}
function setthisFrame()
{
//alert("called");
//alert(document.getElementById("showimage").style.width);
	document.getElementById("iframeTD").style.fontSize = '0px';
	document.getElementById("iframeTD").style.visibility = 'hidden';
	document.getElementById("myIframe").style.left = '4px';
	document.getElementById("myIframe").style.top = '32px';
	if (document.getElementById("myIframe").src != '')
	{
		document.getElementById("myIframe").style.visibility = 'visible';
	}else
	{
		document.getElementById("myIframe").style.visibility = 'hidden';
	}
	if (ns6)
	{
		document.getElementById("myIframe").style.width=(parseInt(document.getElementById("showimage").style.width) - 7)+'px'
		document.getElementById("myIframe").style.height=(parseInt(document.getElementById("showimage").style.height) - 39)+'px'
		document.getElementById("w_status").innerHTML = "Done"
	}else
	{
		document.getElementById("w_status").innerText = "Done"
	}
	if (wresize == "true")
	{
		if (IE)
		{
			document.all.image.style.visibility="visible"
		}else
		{
			document.getElementById("image").style.visibility="visible"
		}
	}
}
function chk()
{
	if (ResizeL == "True")
	{
		getMouseUp();
	}else
	{
		dragapproved=false
	}
}

window.onload = at