
/******************************************
* Popup Box- By Jim Silver @ jimsilver47@yahoo.com
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

	//function getCoord()
	//{
		//var obj = document.getElementById("add_element");
		//alert(obj);
		//obj.add_element = new Object();
		function findPos(nameVar){
			var obj = document.getElementById(nameVar);
			var posX = obj.offsetLeft;var posY = obj.offsetTop;
			while(obj.offsetParent){
				posX=posX+obj.offsetParent.offsetLeft;
				posY=posY+obj.offsetParent.offsetTop;
			if(obj==document.getElementsByTagName('body')[0]){break}
			else{obj=obj.offsetParent;}
		}
		alert(posX+'-'+posY)
		}
		//sessvars.lefty.toString();
		//sessvars.toppy.toString();
	//}
	
	
	
function hideDiv(varDivName)
{
	crossobj=ns6? document.getElementById(varDivName) : document.all[varDivName]
	if (ie4||ns6)
	crossobj.style.visibility="hidden"
	else if (ns4)
	document.varDivName.visibility="hide"
}

function showDiv(varDivName)
{
	crossobj=ns6? document.getElementById(varDivName) : document.all.varDivName
	if (ie4||ns6)
	crossobj.style.visibility="visible"
	else if (ns4)
	document.varDivName.visibility="show"
}

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

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 (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
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){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode && 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)

dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmouseup=new Function("dragapproved=false")

////drag drop functions end here//////

function hidebox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
document.getElementById('holder').innerHTML="\n"+ 
"<div id='showimage' style='position:relative; width:540px; z-index:200; '>\n"+
"</div>\n"+
"";
}
function showbox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
document.showimage.visibility="show"
}

function infoDiv(imageName,imageProp,setX)
{
	
	
	var newImage = imageProp;
	
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td width='418' ></td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_sample_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:center; vertical-align:top; width:534px; height:277px; padding-left:5px' colspan='2'>\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
				
				" " + newImage + "\n"+
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	
	var obj = document.getElementById(imageName);
			var posX = obj.offsetLeft;var posY = obj.offsetTop;
			while(obj.offsetParent){
				posX=posX+obj.offsetParent.offsetLeft;
				posY=posY+obj.offsetParent.offsetTop;
				if(obj==document.getElementsByTagName('body')[0]){break}
				else{obj=obj.offsetParent;}
			}
		
	var newX = setX;
	var newY = posY;
	
	function moveIt()
	{
		var obj = document.getElementById('add_element');
		var obj2 = document.getElementById('holder');
		obj2.style.top = newY + 'px';
		obj2.style.left = newX + 'px';
		//alert(posX+'-'+posY)
	}
	moveIt();
	//newdiv = document.createElement("<div id='showimage' style='position:absolute; height:100px; width:250px; left:400px; top:1100px; z-index:200; background-color:#000'>fsdfsdfsdfs</div>");
	//newdiv.innerHTML = "this is where it happens";
	//container = document.getElementById("container");
	//container.appendChild(newdiv);

}

function bulletDiv(imageName,setX)
{
	
	
	
		function findPos(imageName){
			
		}
	
	var newImage = imageName;
	if (newImage == "form_identification"){
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td style='width:408px; text-align:left; padding-left:10px; padding-top:2px; font-weight:bold; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#666666'>Form Idenitification continued</td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_bullets_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:left; vertical-align:top; width:534px; height:277px; padding-left:0px; padding-right:10px; font-size:12px; font-family:Arial, Helvetica, sans-serif;' colspan='2' >\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
								"<br />\n"+
                                "<ul class='li_shift'>\n"+
                                    "<li><span>Match forms that are rotated 90, 180, or 270 degrees from template image</span></li>\n"+
                                    "<li><span>Match forms scaled from 90% to 110% of the template size</span></li>\n"+
                                    "<li><span>Match forms scanned at 50% to 150% of the template resolution</span></li>\n"+
                                    "<li><span>Match forms skewed up to 20 degrees </span></li>\n"+
                                    "<li><span>Limit matching to a subset of templates</span></li>\n"+
                                    "<li><span>Set the level of effort for form matching</span></li>\n"+
                                    "<li><span>Set minimum acceptable confidence level for form matching</span></li>\n"+ 
                                    "<li><span>Return up to 100 alternative form matches of lower certainty</span></li>\n"+

                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "form_registration"){
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td style='width:408px; text-align:left; padding-left:10px; padding-top:2px; font-weight:bold; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#666666'>Form Registration continued</td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_bullets_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:left; vertical-align:top; width:534px; height:277px; padding-left:0px; padding-right:10px; font-size:12px; font-family:Arial, Helvetica, sans-serif;' colspan='2' >\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
								"<br />\n"+
                                "<ul class='li_shift'>\n"+
                                    "<li><span>Can also use anchor marks for registration</span></li>\n"+ 
                                    "<li><span>Can apply aligned image adjustments to the original image</span></li>\n"+
                                    "<li><span>Register forms even when they exhibit:</span></li>\n"+
                                    "<li style ='margin-left:20px;'><span>Skew up to 20 degrees</span></li>\n"+
                                    "<li style ='margin-left:20px;'><span>Scale from 90 to 110% </span></li>\n"+
                                    "<li style ='margin-left:20px;'><span>Resolutions from 50% 150% of the template </span></li>\n"+
                                    "<li style ='margin-left:20px;'><span>Rotation (at 90, 180, and 270 degrees)</span></li>\n"+

                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "form_drop_out"){
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up228.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td style='width:408px; text-align:left; padding-left:10px; padding-top:2px; font-weight:bold; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#666666'>Form Drop Out continued</td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_bullets_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:left; vertical-align:top; width:534px; height:277px; padding-left:0px; padding-right:10px; font-size:12px; font-family:Arial, Helvetica, sans-serif;' colspan='2' >\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
								"<br />\n"+
                                "<ul class='li_shift'>\n"+
                                    "<li><span>Adjust for distortion caused by printing, copying or scanning</span></li>\n"+
                                    "<li><span>Apply “character smoothing” for increased OCR accuracy</span></li>\n"+
                                    "<li><span>Selective drop out in specified fields </span></li>\n"+
                                    "<li><span>Create image clips by cropping from source image </span></li>\n"+

                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "omr"){
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up228.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td style='width:408px; text-align:left; padding-left:10px; padding-top:2px; font-weight:bold; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#666666'>OMR <span style='font-size:12px;'>(Optical Mark Recognition)</span> continued</td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_bullets_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:left; vertical-align:top; width:534px; height:277px; padding-left:0px; padding-right:10px; font-size:12px; font-family:Arial, Helvetica, sans-serif;' colspan='2' >\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
								"<br />\n"+
                                "<ul class='li_shift'>\n"+
                                    "<li><span>Specify fields as grids (rows by columns) or single bubbles</span></li>\n"+
                                    "<li><span>Programmatic specification of bubble shapes</span></li>\n"+
                                    "<li><span>Recognize checked boxes</span></li>\n"+
                                    "<li><span>Unlimited number of fields</span></li>\n"+
                                    "<li><span>Set recognition parameters for each field </span></li>\n"+
                                    "<li><span>View confidence values for each OMR field</span></li>\n"+

                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "image_data_transfer"){
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:540px; height:302px  z-index:200; background-image: url(images/prod_sample_pop-up228.gif); background-repeat:no-repeat'>\n"+
				"<table border='0' width='540' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td style='width:408px; text-align:left; padding-left:10px; padding-top:2px; font-weight:bold; font-size:16px; font-family:Arial, Helvetica, sans-serif; color:#666666'>Image and Data Transfer continued</td>\n"+
					"<td style='cursor:hand; width:122px; text-align:left'><a href='#' onClick='hidebox();return false'><img src='images/prod_bullets_close.gif' width='122' height='27' border=0></a></td>\n"+
				  "</tr>\n"+
				  "<tr>\n"+
					"<td style='text-align:left; vertical-align:top; width:534px; height:277px; padding-left:0px; padding-right:10px; font-size:12px; font-family:Arial, Helvetica, sans-serif;' colspan='2' >\n"+
				
				"<!-- PUT YOUR CONTENT BETWEEN HERE -->\n"+
								"<br />\n"+
                                "<ul class='li_shift'>\n"+
                                     "<li><span>For reading, revising and writing form templates and sets</span></li>\n"+
                                    "<li><span>For bitonal, grayscale and color files</span></li>\n"+
                                    "<li><span>Unicode character support</span></li>\n"+
                                    "<li><span>Customer-defined field types, and custom data attached to fields, forms, and form sets </span></li>\n"+

                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
		
	var obj = document.getElementById(imageName);
			var posX = obj.offsetLeft;var posY = obj.offsetTop;
			while(obj.offsetParent){
				posX=posX+obj.offsetParent.offsetLeft;
				posY=posY+obj.offsetParent.offsetTop;
				if(obj==document.getElementsByTagName('body')[0]){break}
				else{obj=obj.offsetParent;}
			}
		
	var newX = setX;
	var newY = posY;
	
	function moveIt()
	{
		var obj = document.getElementById('add_element');
		var obj2 = document.getElementById('holder');
		obj2.style.top = newY + 'px';
		obj2.style.left = newX + 'px';
		//alert(posX+'-'+posY)
	}
	moveIt();
	//newdiv = document.createElement("<div id='showimage' style='position:absolute; height:100px; width:250px; left:400px; top:1100px; z-index:200; background-color:#000'>fsdfsdfsdfs</div>");
	//newdiv.innerHTML = "this is where it happens";
	//container = document.getElementById("container");
	//container.appendChild(newdiv);

}

