function openImageWin(src,title,w,h) {
	win = eval('window.open("","","width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+'")'); 
	win.document.open();
	win.document.write('<html><head><title>'+title+'</title></head>');
	win.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"></body></html>');
	win.document.write('<img src="'+src+'" width="'+w+'" height="'+h+'">');
	win.document.write('</body></html>');
	win.document.close();
	win.focus();
};
function openFlashWin(src,title,w,h,swfw,swfh) {
	swfw = (!swfw)? w : swfw;
	swfh = (!swfh)? h : swfh;
	w = (swfh>h)? w+17 : w;
	scrollvalue = (swfh>h)? 'yes' : 'no';
	win = eval('window.open("","","width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+'")'); 
	win.document.open();
	win.document.write('<html><head><title>'+title+'</title>');
	win.document.write('</head>');
	win.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="'+scrollvalue+'">');
	win.document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+swfw+'" height="'+swfh+'">');
	win.document.write('<param name="movie" value="'+src+'">');
	win.document.write('<param name="quality" value="high">');
	win.document.write('<param name="scale" value="false">');
	win.document.write('<param name="menu" value="false">');
	win.document.write('<embed src="'+src+'" quality="high" menu="false" scale="noscale" bgcolor="#FFFFFF" width="'+swfw+'" height="'+swfh+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
	win.document.write('</object>');
	win.document.write('</body></html>');
	win.document.close();
	win.focus();
};
function openNewWin(content,title,w,h,lm,tm) {
	win = eval('window.open("","","width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+'")'); 
	win.document.open();
	win.document.write('<html><head>');
	win.document.write('<title>'+title+'</title>');
	win.document.write('<LINK REL="StyleSheet" HREF="styles/style.css" type="text/css">');
	win.document.write('</head>');
	win.document.write('<body leftmargin="'+lm+'" topmargin="'+tm+'" marginwidth="'+lm+'" marginheight="'+tm+'" scroll="yes"></body></html>');
	win.document.write(content);
	win.document.write('</body></html>');
	win.document.close();
	win.focus();
};
function openWin(src,name,w,h) {
	eval('window.open("'+src+'","'+name+'","width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+'")'); 
};
function openWin1(src,name,w,h) {
	win=eval('window.open("'+src+'","'+name+'","width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+'")'); 
	win.document.open();
        win.focus();
};


function openWin2(src,name,w,h) {
	win=eval('window.open("'+src+'","'+name+'","width='+w+',height='+h+",scrollbars='yes',resizable='yes',toolbar='yes',menubar='yes'"+',innerWidth='+w+',innerHeight='+h+'")'); 
	win.document.open();
        win.focus();
};

//specific to services pages IGXGlobal
var serviceTitle;
var serviceIcon;
function popupTemplate(linkObj,contentID) {
	liObj = linkObj.parentNode;
	parentObj = liObj.parentNode;
	contentObj = document.getElementById(contentID);
	contentArray = [];
	count = 0;
	
	for (var i=0; i<parentObj.childNodes.length; i++) {
		if (parentObj.childNodes[i]==liObj) {index=count;}		
		if (parentObj.childNodes[i].tagName=='LI') {count++;}
	}
	for (var i=0; i<contentObj.childNodes.length; i++) {
		if (contentObj.childNodes[i].nodeType==1) {contentArray.push(contentObj.childNodes[i]);}
	}
	//alert(contentArray[(index*2)+1].innerHTML+', '+index);
	content = serviceIcon+serviceTitle+'<br><br>';
	content += '<h2>'+linkObj.innerHTML+'</h2>';
	content += contentArray[(index*2)+1].innerHTML;
	content += '<p><a href="javascript://" onClick="window.close();">close</a></p>'; 
	openNewWin(content,linkObj.innerHTML,420,300,20,20);	
}
