function writelink(emailname, classname) {
	document.write('<a href=\"mailto:' + emailname + '\@codejock.com\" ' + 'class=\"' + classname + '\">' + emailname + '@codejock.com</a>') ;
}
function writelink2(emailname, classname, title) {
	document.write('<a href=\"mailto:' + emailname + '\@codejock.com\" ' + 'class=\"' + classname + '\">' + title + '</a>') ;
}
function CheckSearchForm(searchForm) {
	if (searchForm.search.value=="") {
		alert("Please enter at least one keyword to search");
		searchForm.search.focus();
		return false;
	}
	return true
}
function showReleaseNotes() {
	newWindow = window.open('Release_Notes.htm','','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=250');
	newWindow.document.close() ;
}
function showReleaseNotes(releaseNotePath) {
	newWindow = window.open(releaseNotePath,'','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=250');
	newWindow.document.close() ;
}
function mOver(menuItem) {
   menuItem.style.cursor = 'hand';
   menuItem.style.color = '#ffd275';
}
function mOut(menuItem) {
   menuItem.style.cursor = 'default';
   menuItem.style.color = '#ffffff';
}
function mOverMenu(menuItem){
   menuItem.style.cursor = 'hand';
	menuItem.style.borderColor = "#9d9d9d";
	menuItem.style.backgroundColor = "#f1f1f1";
	menuItem.style.color = "#000000";
}
function mOutMenu(menuItem){
   menuItem.style.cursor = 'default';
	menuItem.style.borderColor = "#ffffff";
	menuItem.style.backgroundColor = "#ffffff";
	menuItem.style.color = "#000000";
}
function mDown(url) {
	window.location = url;
}

function DisplayImage(imgURL,iWidth,iHeight)
{
	var image = "http://www.codejock.com/public/assets/images/transparent.gif" ;

	newWindow = window.open('', 'ScreenShot', 'toolbar=no,scrollbars=0,resizable=0,width=' + iWidth + ',height=' + iHeight) ;

	newWindow.document.writeln('<html>') ;
	newWindow.document.writeln('<head>') ;
	newWindow.document.writeln('<title>Codejock Software: Screen Shot</title>') ;
	newWindow.document.writeln('</head>') ;
	newWindow.document.writeln('<body style="margin:0px;padding:0px;background-image:url(\'' + image + '\')">') ;
	newWindow.document.writeln('<IMG src="' + imgURL + '" STYLE="position:absolute; left:0px; height:' + iHeight + '; width:' + iWidth + '" />') ;
	newWindow.document.writeln('</body>') ;
	newWindow.document.writeln('</html>') ;

	newWindow.document.close() ;
	newWindow.resizeBy(iWidth-newWindow.document.body.clientWidth,iHeight-newWindow.document.body.clientHeight) ;
	newWindow.focus() ;
}


function HideUnhide(objectID, size)
{
	if (document.getElementById) // DOM3 = IE5, NS6
	{
		if (objectID == "mfc")
		{
			document.getElementById('activex').style.display = 'none';	
			document.getElementById(objectID).style.display = 'block';
			document.getElementById('activexDisabled').style.display = 'block';	
			document.getElementById('activexColor').style.display = 'none';	
			document.getElementById('mfcColor').style.display = 'block';
			document.getElementById('mfcDisabled').style.display = 'none';							
						
			document.getElementById('tabMenu').style.width = size;								

			document.getElementById('vctb').className = "TAB";
			document.getElementById('vctd').className = "TABOPEN";

			document.getElementById('vbtb').className = "TAB_CLOSED";
			document.getElementById('vbtd').className = "TABCLOSED";
			
			document.getElementById('vb').className = "tabLINK";
			document.getElementById('vc').className = "tabLINKbold";						

		}
		else if (objectID == "activex")
		{
			document.getElementById('mfc').style.display = 'none';	
			document.getElementById(objectID).style.display = 'block';	
			document.getElementById('activexColor').style.display = 'block';
			document.getElementById('activexDisabled').style.display = 'none';								
			document.getElementById('mfcColor').style.display = 'none';
			document.getElementById('mfcDisabled').style.display = 'block';				
		
			document.getElementById('tabMenu').style.width = size;												

			document.getElementById('vbtb').className = "TAB";
			document.getElementById('vbtd').className = "TABOPEN";

			document.getElementById('vctb').className = "TAB_CLOSED";
			document.getElementById('vctd').className = "TABCLOSED";
			
			document.getElementById('vc').className = "tabLINK";
			document.getElementById('vb').className = "tabLINKbold";	

		}
	}

}

function tabOver(tab) {
	if (document.getElementById) // DOM3 = IE5, NS6
	{
   		document.getElementById(tab).className = 'tabLINKhover';
   	}
}
function tabOut(tab) {
	if (document.getElementById) // DOM3 = IE5, NS6
	{
   		document.getElementById(tab).className = 'tabLINK';
   	}
}
function toggleVisibleMenu(id)
{
  var array = new Array("products","downloads","howtobuy","technicalsupport","links","company") ;

  for ( var x = 0; x < array.length; ++x )  
  {
    var e = document.getElementById(array[x]) ;
    e.style.display = (array[x] == id) ? "" : "none" ;
  }
}

