D(one) IT

IT Tips, Tricks & Such

Monthly Archives: January 2011

ActiveSync device connection errors

While trying to connect a couple sample devices to Exchange 2010 ActiveSync, I came across the following errors while setting the test email account:

iPhone error: “The connection to the server failed”

Android error: “Unable to open connection to server”

Looking at the Exchange server’s event logs, I found EventID 1053: “Exchange ActiveSync doesn’t have sufficient permissions to create the… container under Active Directory user…”

To resolve this issue, enable the Advanced Security permission: “Include inheritable permissions from the object’s parent” for the effected user within Active Directory.

Advertisements

Exchange 2010 management console: “An error caused a change in the current set of domain controllers…”

While using the Exchange 2010 Management Console and navigating to the recipient mailbox, I received:

An error caused a change in the current set of domain controllers. It was running the command ‘Get-Recipient -PropertySet ConsoleLargeSet -resultSize ‘1000’ -SortBy DisplayName -RecipientType ‘UserMailbox”.

This  error started to occur shortly after the decommission of our old primary domain controller.

To fix this error, close the EMC and delete the xml file:

“C:\Users\username\AppData\Roaming\Microsoft\MMC\Exchange Management Console”

Outlook 2010 thumbnailPhoto in Active Directory

While testing Outlook 2010 on Exchange 2010, I found the GAL now supports photos (out of the box… almost)

Requirements (GAL Photos in Exchange 2010 and Outlook 2010):

  • Outlook 2010 (Note: Exchange 2010 OWA doesn’t retrieve AD photos).
  • AD forest upgraded to support 2008 domain controllers (adprep, not Function Level).
  • Modify the thumbnailPhoto attribute in AD schema to replicate to the Global Catalog.

Uploading photos into AD can be done using the Exchange cmdlet: Import-RecipientDataProperty, but is limited to a max 10k photo size.

Import-RecipientDataProperty -Identity Michael -Picture -FileData ([Byte[]]$(Get-Content -Path "S:\Staff_Photos\Michael.jpg" -Encoding Byte -ReadCount 0))

I came across this free tool: ADPhotoEdit which can push the size limit to 100k and has a pretty awesome gui. There is a paid version which includes bulk features.

Update: Outlook 2003-2007 can access the thumbnailPhoto if  the Outlook Social Connector is installed and the thumbnailPhoto property in OAB is changed from an indicator to a value. (Updating OABDeploying OSC)

Collection of freeware tools

List Local Admins from list of computers

I came across this Blog posting: Brian Desmond, while looking for a simple script to list all the users that had Local Administrator rights to their computer.

 

DumpLocalAdministrators.vbs (click “show source” below)

'==========================================================================
' NAME: Dump Local Administrators Membership
'
' AUTHOR: Brian Desmond,
' DATE  : 4/16/2007
'==========================================================================

Option Explicit

Const LogFile = "LocalAdmins.log"
Const resultFile = "LocalAdministratorsMembership.csv"
Const inputFile = "computers.txt"

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

Dim shl
Set shl = WScript.CreateObject("WScript.Shell")

Dim fil
Set fil = fso.OpenTextFile(inputFile)

Dim results
Set results = fso.CreateTextFile(resultFile, True)

WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
'WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
'On Error Resume Next

Dim grp
Dim line
Dim exec
Dim pingResults
Dim member

While Not fil.AtEndOfStream
	line = fil.ReadLine

	Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
  	pingResults = LCase(exec.StdOut.ReadAll)

 	If InStr(pingResults, "reply from") Then
 		WriteToLog line & " responded to ping"
 		'WScript.Echo line & " responded to ping"

 		'On Error Resume Next

		Set grp = GetObject("WinNT://" & line & "/Administrators")

		'WScript.Echo line & ", Administrators"
		results.WriteLine line & ",Administrators,"

		For Each member In grp.Members
			'WScript.Echo 	"Administrators: " & member.Name
			WriteToLog line & ": Administrators - " & member.Name
			results.WriteLine ",," & member.Name
		Next
	Else
		WriteToLog line & " did not respond to ping"
		'WScript.Echo line & " did not respond to ping"
	End If
Wend

results.Close

Sub WriteToLog(LogData)
	On Error Resume Next

	Dim fil
	'8 = ForAppending
	Set fil = fso.OpenTextFile(LogFile, 8, True)

	fil.WriteLine(LogData)

	fil.Close
	Set fil = Nothing
End Sub

Fixing Public Folder replication issues from Exchange 2003 to 2007 or 2010

During a transition of Exchange 2003 to 2010, we ran into replication issues in some of the Public Folders. The issue was tracked down to Categories that contain a bad character. Instead of going through all the entries manually, I found a replication fix script: http://blogs.technet.com/b/bill_long/archive/2010/04/22/fixing-public-folder-replication-errors-from-exchange-2003-to-exchange-2007-or-2010.aspx

Notes:

  • You might need to modify $allPFs. Change the “All Public Folders” text to match however it looks in Outlook.
  • By default the script will not change any data unless you set $commitChanges to true.
  • Power shell’s default script execution mode is Restricted, which might prevent the use of Fix-PFItems.ps1. Quick workaround is to run the following command in power shell (remember to change back to restricted when done):
    Set-ExecutionPolicy Unrestricted

Fix-PFItems.ps1 (click “show source” below)


# Fix-PFItems.ps1
#
# This script should be run on a workstation where Outlook is installed
# as well as Powershell. You do not need the Exchange Management Console
# installed in order to use this. The Outlook profile you are using should be
# one that will access public folders on the Exchange 2003 server, because
# the whole point is to fix the items on the 2003 side so they will replicate
# to Exchange 2007/2010. If you're not sure which replica of a folder your
# profile is accessing, launch MFCMapi, logon to the same profile, navigate
# to the public folder, and look at the PR_REPLICA_SERVER property. This will
# tell you which replica your client is looking at.
#
# Syntax info:
#
# Examples:
# .\Fix-PFItems -folderPath "Departments\HR" -splitOnBadchar $true -resetEmptyCategories $false -doAppointments $false -doInstanceKey $false -doSubfolders $false
# .\Fix-PFItems "Departments\HR" $true $false $false $false $false
#
# folderPath should be in the form: "TopLevelFolder\Subfolder\Subfolder 2"
# a folderPath of "" will run against all public folders
# splitOnBadChar determines whether we split the category into two names, or just replace badChar
# resetEmptyCategories will clear all categories on items that already appear to have no
#   categories. This ensures that the categories value is REALLY empty, and should fix
#   items that have an empty array in the categories. Be aware that since this changes ALL
#   items that appear to have no categories, it could cause a lot of replication.
# doAppointments determines whether appointment items are processed. Note that if this is $true
#    and $commitChanges is set to $true, ALL appointment items in the specified folders
#    will be modified by the script. This will change the last modified time and cause
#    replication.
# doInstanceKey determines whether we clear PR_INSTANCE_KEY on items. Note that if this is $true
#    and $commitChanges is set to $true, ALL items in ALL folders that you specify will be
#    be modified.
# doSubfolders determines whether we automatically traverse subfolders of the specified folder
#
# This script will identify 5 types of problems:
#
# 1. Categories that contain a bad character, typically a comma. This error is identified in the
#    content conversion tracing by output that states:
#
#    PropertyValidationException: Property validation failed. Property = [{GUID}:'Keywords']
#    Categories Error = Element 0 in the multivalue property is invalid..
#
#    This problem will always be fixed if $commitChanges is $true (see below). The
#    -splitOnBadChar parameter lets you choose whether to split the category into two separate
#    categories (A category such as "catone,cattwo" would become two separate categories
#    "catone" and "cattwo") or to simply get rid of the bad character ("catone,cattwo" becomes
#    "catonecattwo").
#
# 2. Categories that contain an emtpy array. This problem is identified by the same tracing
#    output as that shown for problem #1. This problem can be fixed if -resetEmptyCategories
#     is $true and $commitChanges is changed to $true (see below). Note that this will modify
#    all items that appear to have no categories, as the script can't tell the difference
#    between an empty array and an item that truly has no categories.
#
# 3. Appointment items with invalid start/end dates. This problem can be fixed if $doAppointments
#     is $true and $commitChanges is changed to $true. See below. Note that this does not fix
#    every possible problem with appointments.
#
# 4. Address type properties that are longer than 9 characters. This problem can be identified
#    by content conversion tracing that states:
#
#    Property validation failed. Property = [{GUID}:0x8nnn] Email2AddrType Error =
#    Email2AddrType is too long: maximum length is 9, actual length is nn..
#
#    This problem cannot be fixed by the script. You can try to fix it manually using
#    mfcmapi, but sometimes these properties cannot be changed and the item
#    must be deleted.
#
# 5. A bad PR_INSTANCE_KEY. This problem can be identified by an error in the
#    content conversion tracing that says MapiExceptionPropsDontMatch. This problem can
#    be fixed by the script if -doInstanceKey is $true and $commitChanges is $true (see
#    below).
#

param([string]$folderPath, [bool]$splitOnBadchar, [bool]$resetEmptyCategories, [bool]$doAppointments, [bool]$doInstanceKey, [bool]$doSubfolders)

#
# By default, the script does NOT change anything. You must
# change $commitChanges to $true in order for the script to actually
# do anything.
#
# This has the potential to change a lot of items in your public folders!
# Run it in READ ONLY mode first to see what will get changed, and have a
# good backup just in case!
#
$commitChanges = $false

# $badChar is the character we want to get rid of in the category names.
# Normally it's a comma, but it can be changed to anything you want.
$badChar = ","

# $reportAll will make the script report all categories and address types
# that were found. This is just for reporting purposes so you can see what values
# exist.
$reportAll = $false

#
##########################################################################
#
# Be careful changing anything below this point.
#
##########################################################################
#

$allCategories = new-object System.Collections.Specialized.StringCollection
$allAddressTypes = new-object System.Collections.Specialized.StringCollection

function GetNamedFromCollection($name, $collection)
{
 foreach ($item in $collection)
 {
 if ($item.Name -eq $name -or $item.DisplayName -eq $name)
 {
 return $item
 }
 }
 return $null
}

function RecordAddrType($type)
{
 if ($reportAll)
 {
 if (!($allAddressTypes.Contains($type)))
 {
 $temp = $allAddressTypes.Add($type)
 }
 }
}

function DoCategories($item)
{
 $categoryArray = $item.PropertyAccessor.GetProperty("urn:schemas-microsoft-com:office:office#Keywords")
 if ($categoryArray.Length -eq 0 -and $resetEmptyCategories -eq $true)
 {
 if ($commitChanges)
 {
 "    Resetting categories..."
 $item.PropertyAccessor.SetProperty("urn:schemas-microsoft-com:office:office#Keywords", $null)
 $item.Save()
 }
 else
 {
 "    Would have reset the categories, but we're in Read-Only mode."
 }
 }
 else
 {
 $fixedCategories = $false
 [string[]]$newCategoryArray = @()
 foreach ($cat in $categoryArray)
 {
 if ($reportAll)
 {
 if (!($allCategories.Contains($cat)))
 {
 $temp = $allCategories.Add($cat)
 }
 }
 if ($cat.Contains($badChar))
 {
 if (!($splitOnBadchar))
 {
 # In this case, we just replace the badChar with nothing
 $newCategoryArray += $cat.Replace($badChar, "")
 }
 else
 {
 # In this case, we split it into multiple separate categories
 $categorySplit = $cat.Split($badChar)
 foreach ($newCat in $categorySplit)
 {
 $newCat = $newCat.Trim()
 if ($newCat.Length -gt 0)
 {
 $newCategoryArray += $newCat
 }
 }
 }
 $fixedCategories = $true
 }
 elseif ($cat.Trim() -eq "")
 {
 # this category should be deleted from the item
 $fixedCategories = $true
 }
 else
 {
 $newCategoryArray += $cat
 }
 }

if ($fixedCategories)
 {
 "    Old category list for this item:"
 foreach ($cat in $categoryArray)
 {
 ("        " + $cat)
 }
 "    New category list for this item:"
 foreach ($cat in $newCategoryArray)
 {
 ("        " + $cat)
 }
 if ($commitChanges)
 {
 $item.PropertyAccessor.SetProperty("urn:schemas-microsoft-com:office:office#Keywords", $newCategoryArray)
 $item.Save()
 ("    Changes saved.")
 }
 else
 {
 ("    Changes not saved (READ ONLY mode).")
 }
 }
 }
}

function DoAppointmentProps($item)
{
 if ($item.Class -eq 26) # olAppointment in the olObjectClass enumeration is 26
 {
 if ($commitChanges)
 {
 ("    Updating appointment props: " + $item.Subject)
 if ($item.IsRecurring)
 {
 $recurPattern = $item.GetRecurrencePattern()
 $recurPattern.StartTime = $recurPattern.StartTime
 $recurPattern.EndTime = $recurPattern.EndTime
 $item.Save()
 }
 else
 {
 $item.Start = $item.Start
 $item.End = $item.End
 $item.Save()
 }
 }
 else
 {
 ("    Appointment props not updated (READ ONLY mode).")
 }
 }
}

function DoInstanceKey($item)
{
 if ($commitChanges)
 {
 ("    Clearing PR_INSTANCE_KEY: " + $item.Subject)
 $item.PropertyAccessor.DeleteProperty("<a href="http://schemas.microsoft.com/mapi/proptag/0x0FF60102%22)">http://schemas.microsoft.com/mapi/proptag/0x0FF60102")</a>
 $item.Save()
 ("    Changes saved.")
 }
 else
 {
 ("    PR_INSTANCE_KEY not cleared (READ ONLY mode).")
 }
}

function DoAddrType($item)
{
 $senderAddrType = $item.PropertyAccessor.GetProperty("<a href="http://schemas.microsoft.com/mapi/proptag/0x0C1E001E%22)">http://schemas.microsoft.com/mapi/proptag/0x0C1E001E")</a>
 RecordAddrType $senderAddrType
 if ($senderAddrType.Length -gt 9)
 {
 ("    WARNING! PR_SENDER_ADDRTYPE is too long: " + $senderAddrType)
 }

$sentRepresentingAddrType = $item.PropertyAccessor.GetProperty("<a href="http://schemas.microsoft.com/mapi/proptag/0x0064001E%22)">http://schemas.microsoft.com/mapi/proptag/0x0064001E")</a>
 RecordAddrType $sentRepresentingAddrType
 if ($sentRepresentingAddrType.Length -gt 9)
 {
 ("    WARNING! PR_SENT_REPRESENTING_ADDRTYPE is too long: " + $sentRepresentingAddrType)
 }

$recipients = $item.Recipients
 if ($recipients -ne $null)
 {
 foreach ($recipient in $recipients)
 {
 $addrType = $recipient.PropertyAccessor.GetProperty("<a href="http://schemas.microsoft.com/mapi/proptag/0x3002001E%22)">http://schemas.microsoft.com/mapi/proptag/0x3002001E")</a>
 if ($addrType.Length -gt 9)
 {
 ("    WARNING! A recipient PR_ADDRTYPE is too long: " + $addrType)
 }
 }
 }

if ($item.Email1AddressType.Length -gt 0)
 {
 RecordAddrType $item.Email1AddressType
 }
 if ($item.Email1AddressType.Length -gt 9)
 {
 ("    WARNING! Email1AddressType is too long: " + $item.Email1AddressType)
 }

if ($item.Email2AddressType.Length -gt 0)
 {
 RecordAddrType $item.Email2AddressType
 }
 if ($item.Email2AddressType.Length -gt 9)
 {
 ("    WARNING! Email2AddressType is too long: " + $item.Email2AddressType)
 }

if ($item.Email3AddressType.Length -gt 0)
 {
 RecordAddrType $item.Email3AddressType
 }
 if ($item.Email3AddressType.Length -gt 9)
 {
 ("    WARNING! Email3AddressType is too long: " + $item.Email3AddressType)
 }
}

function DoFolder($folder)
{
 $replicaServer = $folder.PropertyAccessor.GetProperty("<a href="http://schemas.microsoft.com/mapi/proptag/0x6644001E%22)">http://schemas.microsoft.com/mapi/proptag/0x6644001E")</a>
 $items = $folder.Items
 ($items.Count.ToString() + " items found in folder " + $folder.FolderPath)
 ("Accessing this folder on server: " + $replicaServer)
 foreach ($item in $items)
 {
 ("Checking item: " + $item.Subject)
 if ($item.PropertyAccessor -ne $null)
 {
 DoCategories($item)
 DoAddrType($item)
 if ($doAppointments)
 {
 DoAppointmentProps($item)
 }
 if ($doInstanceKey)
 {
 DoInstanceKey($item)
 }
 }
 else
 {
 "    No PropertyAccessor on this item. It may be in a conflict state."
 }
 }
 if ($doSubfolders)
 {
 foreach ($subfolder in $folder.Folders)
 {
 DoFolder($subfolder)
 }
 }
}

"Starting..."

if ($commitChanges)
{
 "commitChanges has been set to TRUE. The script WILL save changes."
}
else
{
 "commitChanges is set to FALSE. Running in READ ONLY mode. Changes will NOT be saved."
}

$outlook = new-object -com Outlook.Application
if (!($outlook.Version -like "12.*" -or $outlook.Version -like "14.*"))
{
 ("This script requires Outlook 2007 or 2010. Your version: " + $outlook.Version)
 return
}
$mapi = $outlook.GetNamespace("MAPI")

#
# First, check the categories list and fix if necessary
#

"Checking Outlook categories list..."
$categories = $mapi.Categories
foreach ($category in $categories)
{
 if ($category.Name -ne $null)
 {
 if ($category.Name.Contains($badChar))
 {
 [string[]]$newNames = @()
 ("    Fixing category in Outlook category list: " + $category.Name)
 if (!($splitOnBadchar))
 {
 # In this case, we just replace the badChar with nothing
 $newName += $category.Name.Replace($badChar, "")
 }
 else
 {
 # In this case, we split it into multiple separate categories
 $categorySplit = $category.Name.Split($badChar)
 foreach ($newCat in $categorySplit)
 {
 if ($newCat.Length -gt 0)
 {
 $newNames += $newCat
 }
 }
 }
 if ($commitChanges)
 {
 $foo = $categories.Remove($category.Name)
 foreach ($newName in $newNames)
 {
 $foo = $categories.Add($newName)
 }
 }
 }
 }
}

#
# Categories list should be in good shape now.
# Now find the specified folder.
#

"Finding the specified folder..."
$session = $mapi.Session
$pfStore = $null
foreach ($store in $mapi.Stores)
{
 if ($store.ExchangeStoreType -eq 2)
 {
 $pfStore = $store
 }
}
$pfRoot = $pfStore.GetRootFolder()
$allPFs = GetNamedFromCollection "All Public Folders" $pfRoot.Folders
if ($allPFs -eq $null)
{
 "Couldn't find All Public Folders folder."
 return
}

if ($pfStore -eq $null)
{
 "Couldn't find public folder store."
 return
}

$pfRoot = $pfStore.GetRootFolder()

$folderPath = $folderPath.Trim("\")
$folderPathSplit = $folderPath.Split("\")
$folder = $allPFs

if ($folderPath.Length -gt 0)
{
 "Traversing folder path..."
 for ($x = 0; $x -lt $folderPathSplit.Length; $x++)
 {
 $folder = GetNamedFromCollection $folderPathSplit[$x] $folder.Folders
 }
 if ($folder -eq $null)
 {
 ("Could not find folder: " + $folderPath)
 return
 }
 ("Found folder: " + $folder.FolderPath)
}

#
# Got the folder.
# Start processing the folder and subfolders.
#

DoFolder $folder

"Done!"

if ($reportAll)
{
 ""
 "Categories found:"
 $allCategories
 ""
 "Address types found:"
 $allAddressTypes
}

FreeMind – free mind mapping software

FreeMind is a Java-based, cross-platform mind mapping software.

“A mind map is a diagram used to represent words, ideas, tasks, or other items linked to and arranged around a central key word or idea. Mind maps are used to generate, visualize, structure, and classify ideas, and as an aid to studying and organizing information, solving problems, making decisions, and writing.” – Wikipedia

Download: http://freemind.sourceforge.net

Prevent users from removing NIC or SCSI controller within VMware hardware v7

After upgrading VDI virtual machines to VMware Hardware version 7, users had the ability to eject a VM’s NIC and SCSI controllers using Window’s “Safely Remove Hardware” icon in the system tray. This would either crash the VM or prevent any remote connection to the VM. The fix was to add: devices.hotplug = “false” to the Virtual Machine’s configuration parameters.

VMware KB article: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

Enable Devices.hotplug

Fix for imaged based clients not showing in WSUS console

WSUSMissingClientFix.bat

net stop wuauserv
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientIDValidation /f
net start wuauserv
wuauclt /resetauthorization /detectnow

Boxee Box web remote

I created a simple web remote to control the Boxee Box.

(Limited due to api: http://developer.boxee.tv/Remote_Control_Interface )

ML Boxee Box Web Remote: Download

Note: changing the commandiframe to display:block; will show the the iframe used to send the commands. If the api command is successful, an “OK” is displayed.

I put most of the code into just the one html. This web remote will work launched right from a folder on a pc or off a hosted web server (not the boxee box). Most remotes I found, had you replace the boxee web server files, which is locked down on the boxee box.

remote.html (click “show source” below)

&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
		&lt;title&gt;MAJL Boxee Remote&lt;/title&gt;
&lt;STYLE type=&quot;text/css&quot;&gt;
&lt;!--
body
{
 	background: url('images/nav.jpg') no-repeat 0 0;
}

a 				{text-decoration:none;
				color:white;}

div#preload { display: none; }

#commandiframe	{position:absolute;
	display:none;
	width:50px;
	height:50px;
	top:0px;
	left:0px;
	font-family:Helvetica, Arial, sans-serif;
	font-size:6px;
	padding:2px;
	background-color:gray
}

#inputfields	{position:absolute;
	display:block;
	width:260px;
	height:25px;
	top:10px;
	left:55px;
	font-family:Helvetica, Arial, sans-serif;
	font-size:15px;
	padding:5px;
	border:5px solid #c5e2a0;
	background-color:gray
}

#up {position:absolute;
  	display:block;
  	width: 97px;
 	height: 80px;
 	background:url('images/up.jpg') no-repeat 0 0;
  	top:236px;
  	left:125px;
  	padding: 0px 0px;
}

#up:visited, #up:hover, #up:active{
  	display:block;
  	width: 97px;
 	height: 80px;
	background:url('images/up_press.jpg') no-repeat 0 0;
	top:236px;
  	left:125px;
  	padding: 0px 0px;
}

#down {position:absolute;
  	display:block;
  	width: 97px;
 	height: 80px;
 	background:url('images/down.jpg') no-repeat 0 0;
  	top:400px;
  	left:125px;
  	padding: 0px 0px;
}

#down:visited, #down:hover, #down:active{
  	display:block;
  	width: 97px;
 	height: 80px;
	background:url('images/down_press.jpg') no-repeat 0 0;
	top:400px;
  	left:125px;
  	padding: 0px 0px;
}

#left {position:absolute;
  	display:block;
  	width: 80px;
 	height: 97px;
 	background:url('images/left.jpg') no-repeat 0 0;
  	top:310px;
  	left:52px;
  	padding: 0px 0px;
}

#left:visited, #left:hover, #left:active{
  	display:block;
  	width: 80px;
 	height: 97px;
	background:url('images/left_press.jpg') no-repeat 0 0;
	top:310px;
  	left:52px;
  	padding: 0px 0px;
}

#right {position:absolute;
  	display:block;
  	width: 80px;
 	height: 97px;
 	background:url('images/right.jpg') no-repeat 0 0;
  	top:310px;
  	left:220px;
  	padding: 0px 0px;
}

#right:visited, #right:hover, #right:active{
  	display:block;
  	width: 80px;
 	height: 97px;
	background:url('images/right_press.jpg') no-repeat 0 0;
	top:310px;
  	left:220px;
  	padding: 0px 0px;
}

#pause {position:absolute;
  	display:block;
  	width: 97px;
 	height: 97px;
 	background:url('images/pause.jpg') no-repeat 0 0;
  	top:80px;
  	left:125px;
  	padding: 0px 0px;
}

#pause:visited, #pause:hover, #pause:active{
	display:block;
  	width: 97px;
 	height: 97px;
	background:url('images/pause_press.jpg') no-repeat 0 0;
	top:80px;
  	left:125px;
  	padding: 0px 0px;
}

#mute {position:absolute;
  	display:block;
  	width: 64px;
 	height: 64px;
 	background:url('images/mute.jpg') no-repeat 0 0;
  	top:80px;
  	left:10px;
  	padding: 0px 0px;
}

#mute:visited, #mute:hover, #mute:active{
	display:block;
  	width: 64px;
 	height: 64px;
	background:url('images/mute_press.jpg') no-repeat 0 0;
	top:80px;
  	left:10px;
  	padding: 0px 0px;
}

#selecta {position:absolute;
  	display:block;
  	width: 97px;
 	height: 97px;
 	background:url('images/select.jpg') no-repeat 0 0;
  	top:310px;
  	left:125px;
  	padding: 0px 0px;
}

#selecta:visited, #selecta:hover, #selecta:active{
  	display:block;
  	width: 97px;
 	height: 97px;
	background:url('images/select_press.jpg') no-repeat 0 0;
	top:310px;
  	left:125px;
  	padding: 0px 0px;
}

#selectb {position:absolute;
  	display:block;
  	width: 97px;
 	height: 97px;
 	background:url('images/home.jpg') no-repeat 0 0;
  	top:580px;
  	left:125px;
  	padding: 0px 0px;
}

#selectb:visited, #selectb:hover, #selectb:active{
  	display:block;
  	width: 97px;
 	height: 97px;
	background:url('images/home_press.jpg') no-repeat 0 0;
	top:580px;
  	left:125px;
  	padding: 0px 0px;
}
--&gt;
&lt;/STYLE&gt;

&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;
&lt;!--
function toggle() {
	var ele = document.getElementById(&quot;settings&quot;);
	var text = document.getElementById(&quot;displayText&quot;);
	if(ele.style.display == &quot;block&quot;) {
    		ele.style.display = &quot;none&quot;;
		text.innerHTML = &quot;Device&quot;;
  	}
	else {
		ele.style.display = &quot;block&quot;;
		text.innerHTML = &quot;Hide&quot;;
	}
}

function linkGenerator(commands){
	frames['debug'].location.href= 'http://' + document.getElementById('userIP').value +':' + document.getElementById('userPort').value + '/xbmcCmds/xbmcHttp?command=' + commands;
	}
--&gt;
&lt;/script&gt;

	&lt;/head&gt;
	&lt;body&gt;
&lt;div id=&quot;preload&quot;&gt;
	&lt;img src=&quot;images/nav.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
	&lt;img src=&quot;images/mute.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/pause.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/up.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/select.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/left.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/right.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/down.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/home.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/mute_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/pause_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/select_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/home_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/up_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/left_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/right_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
    &lt;img src=&quot;images/down_press.jpg&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;
&lt;/div&gt;

  &lt;div id=&quot;settings&quot; style=&quot;display:none&quot;&gt;
    &lt;form id=&quot;inputfields&quot;&gt;
	&lt;b&gt;Boxee&lt;/b&gt;
	&lt;input id=userIP type=&quot;text&quot; size=15 name=&quot;IPvalue&quot; value=&quot;BoxeeBox&quot; onfocus=&quot;if(!this._haschanged){this.value=''};this._haschanged=true;&quot;/&gt;
	&lt;b&gt;:&lt;/b&gt;
	&lt;input id=userPort type=&quot;text&quot; size=5 name=&quot;Portvalue&quot; value=&quot;8800&quot; maxlength=&quot;5&quot;&gt;
	&lt;/form&gt;
  &lt;/div&gt;

		    &lt;div id=&quot;navigation&quot;&gt;
		    &lt;a id=&quot;displayText&quot; href=&quot;javascript:toggle();&quot;&gt;Device&lt;/a&gt;

			&lt;div id=&quot;up&quot; onClick =&quot;linkGenerator('SendKey(270)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;down&quot; onClick=&quot;linkGenerator('SendKey(271)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;left&quot; onClick=&quot;linkGenerator('SendKey(272)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;right&quot; onClick=&quot;linkGenerator('SendKey(273)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;selecta&quot; onClick=&quot;linkGenerator('SendKey(256)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;selectb&quot; onClick=&quot;linkGenerator('SendKey(257)')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;mute&quot; onClick=&quot;linkGenerator('Mute()')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;pause&quot; onclick=&quot;linkGenerator('Pause()')&quot;&gt;&lt;/div&gt;

			&lt;div id=&quot;commandiframe&quot;&gt;
			    <a href=""></a>
			&lt;/div&gt;

	    &lt;/div&gt;

	&lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;