
/******************************************
* 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,coOrdinates,padDing)
{
	
	
	var newImage = imageProp;
	var newCoordinates = coOrdinates;
	var newPadding = padDing;
	
	document.getElementById('holder').innerHTML="\n"+ 
			"<div id='showimage' style='position:relative; width:420px; height:92px; \n"+
				
				" " + newCoordinates + "\n"+
			
			" z-index:200; background-repeat:no-repeat;\n"+
				
				" " + newPadding + "\n"+
			
			" padding-top:44px; line-height:12px; margin:0px; vertical-align:top; text-align:left;'>\n"+
				"<table border='0' width='435' cellspacing='0' cellpadding='0' border='0'>\n"+
				  "<tr>\n"+
					"<td width='435' style='height:92px; text-align:left; vertical-align:top; font-size:12px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#ffffff; line-height:14px; font-weight:bold;'>\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 == "color_detect"){
	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_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>Allows for mixed document color scanning applications containing both color and black and white documents</span></li>\n"+
                                    "<li><span>Analyzes 24-bit images looking for significant amounts of saturated color data</span></li> \n"+
                                    "<li><span>Recommends if color images can safely be converted to bitonal</span></li> \n"+
                                    "<li><span>Enables configurable thresholds to be set for saturation, object size, and object count required for a positive result</span></li>\n"+
                                    "<li><span>Can ignore the dominant background color of an image, allowing monochromatic documents printed on colored paper to be considered \"not color\"</span></li>\n"+
                                    "<li><span>Returns the locations of colored objects on the page </span></li> \n"+
                                    "<li><span>Includes a \"reason\" field for why an image was determined to be \"color\" or \"not color\", helping developers adjust parameters and improve performance</span></li>\n"+
                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "image_detergent"){
	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_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>Cleans up noise and variations in specified colors in 24-bit color images</span></li>\n"+
                                    "<li><span>Flattens each color region to a specified color by adjusting each color region to its center point</span></li> \n"+
                                    "<li><span>Offers an automatic mode to clean dominant colors or can specify color list</span></li>\n"+
                                    "<li><span>Removes JPEG compression artifacts commonly found around characters in scanned color documents</span></li>\n"+
                                    "<li><span>Allows multiple colors to be adjusted without increasing processing time</span></li>\n"+
                                    "<li><span>Removes JPEG compression artifacts commonly found around characters in scanned color documents</span></li>\n"+
                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "color_drop"){
	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_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>Locates specified RGB colors in 24-bit images and drops those colors to white or a specified color</span></li>\n"+
                                    "<li><span>Identifies pixels to change based on proximity to user-specified color values</span></li> \n"+
                                    "<li><span>Provides very precise control over color manipulation</span></li>\n"+
                                    "<li><span>Supports color conversion and color blending to target color</span></li>\n"+
                                    "<li><span>Allows multiple colors to be dropped without adding to processing time</span></li>\n"+
                                    "<li><span>Detects presence of specified colors without drop</span></li>\n"+
                                    "<li><span>Extracts specified colors, dropping everything else to white</span></li>\n"+
                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "virtual_bulb"){
	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_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>Performs software-based HSV color dropout on 24-bit images, emulating a hardware-based dropout scanner through much more powerful and flexible technology</span></li>\n"+
                                    "<li><span>Allows multiple hues and ranges within hues to be dropped to white and adjacent colors to fade into shades of gray</span></li>\n"+
                                    "<li><span>Compensates for variations in color saturation and brightness caused by printing environments </span></li>\n"+
                                    "<li><span>Uses adaptive mode to “tweak” the hue for each image</span></li>\n"+
                                    "<li><span>The inverted operation selects only requested hue and drops all other colors to white</span></li>\n"+
                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "hole_punch"){
	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_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>Removes hole punches and larger areas of black on 1-bit images </span></li>\n"+
                                    "<li><span>Enables user configurable threshold settings </span></li>\n"+
                                    "<li><span>Allows specification of full-page or a specific area of interest </span></li>\n"+
                                    "<li><span>Reduces file sizes and storage requirements with cleaner pages </span></li>\n"+
                                    "<li><span>Returns count of objects found</span></li>\n"+
                                "</ul>\n"+
				
				
				"<!-- END YOUR CONTENT HERE -->\n"+
				
					"</td>\n"+
					"</tr>\n"+
				"</table>\n"+
			"</div>\n"+
		"";
	}
	if (newImage == "inverse_text"){
	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_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>Detects and automatically converts inverted text zones on 1-bit images</span></li>\n"+
                                    "<li><span>Changes white-on-black text to normal black-on-white </span></li>\n"+
                                    "<li><span>Recognizes inverse zones in any shape, including circular </span></li>\n"+
                                    "<li><span>Removes the fill color of text </span></li>\n"+
                                    "<li><span>Reduces file sizes by eliminating unnecessary black pixels</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);

}




