// JavaScript Document
var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

if (nodyn) { event = "nope" }

var tipFollowMouse= true;	
var tipWidth= 350;
var offX= 20;	
var offY= 20; 
var tipFontFamily= "arial,Verdana, helvetica, sans-serif";
var tipFontSize= "10pt";
var tipFontColor= "#000000";
var tipBgColor= "#ffffff"; 
var tipBorderColor= "#000000";
var tipBorderWidth= 1;
var tipBorderStyle= "solid";
var tipPadding= 5;
var messages = new Array();
messages[0] = new Array('../images/obk_widgetsnew_gui.jpg','<p align=justify><b><font color=ff6600>Wizards</font></b><br>Guide you step-by-step through data backup and restore process.</p>',"#FFFFFF");
messages[1] = new Array('../images/obk_baschnew_gui.jpg','<p align=justify><b><font color=ff6600>Backup Scheduler</font></b><br>Schedule backups of your files and folders by setting the day, time and notification options.</p>',"#FFFFFF");
messages[2] = new Array('../images/obk_reschnew_gui.jpg','<p align=justify><b><font color=ff6600>Restore Scheduler</font></b><br>Schedule restore of files and folders from your account to the local machine.</p>','#ffffff','#000000');
messages[3] = new Array('../images/obk_bsemannew_gui.jpg','<p align=justify><b><font color=ff6600>Backup set Manager</font></b><br>Files and folders selected for the backup or restore job.</p>','#ffffff','#000000');
messages[4] = new Array('../images/obk_mirrpnew_gui.jpg','<p align=justify><b><font color=ff6600>Mirror Path</font></b><br>  Replicates the folder structure on your local PC while backing up files to your account.</p>','#ffffff','#000000');
messages[5] = new Array('../images/obk_snapsnew_gui.jpg','<p align=justify><b><font color=ff6600>Snapshots</font></b><br>Point-in-time images of the file at a particular time, every day.</p>','#ffffff','#000000');
messages[6] = new Array('../images/obk_syncnew_gui.jpg','<p align=justify><b><font color=ff6600>Sync</font></b><br>Brings files in your account to be the same as your local computer.</p>','#ffffff','#000000');
messages[7] = new Array('../images/obk_recalnew_gui.jpg','<p align=justify><b><font color=ff6600>Recalculate</font></b><br>Updated information on the space used by your backed up files and folders.</p>','#ffffff','#000000');
messages[8] = new Array('../images/obk_backnownew_gui.jpg','<p align=justify><b><font color=ff6600>Backup Now</font></b><br>Take an immediate backup of your files and folders (default Backup set).</p>','#ffffff','#000000');
messages[9] = new Array('../images/obk_schednew_gui.jpg','<p align=justify><b><font color=ff6600>Schedule</font></b><br>Schedule backup of files and folders for a future day and time.</p>','#ffffff','#000000');
messages[10] = new Array('../images/obk_restnew_gui.jpg','<p align=justify><b><font color=ff6600>Restore</font></b><br>Retrieve files and folders from your account to your local machine.</p>','#ffffff','#000000');
messages[11] = new Array('../images/obk_searnew_gui.jpg','<p align=justify><b><font color=ff6600>Search</font></b><br>Quickly locate files and folders backed up to your IBackup account.</p>','#ffffff','#000000');
messages[12] = new Array('../images/obk_refrnew_gui.jpg','<p align=justify><b><font color=ff6600>Refresh</font></b><br>Reflects updates made to files backed up to your account. </p>','#ffffff','#000000');
messages[13] = new Array('../images/obk_delnew_gui.jpg','<p align=justify><b><font color=ff6600>Delete</font></b><br>Remove files and folders from your IBackup account.</p>','#ffffff','#000000');
messages[14] = new Array('../images/obk_savenew_gui.jpg','<p align=justify><b><font color=ff6600>Save</font></b><br>Save the selected files and folders as a Backup set that can be scheduled for backup.</p>','#ffffff','#000000');
messages[15] = new Array('../images/obk_spacer.gif','<p align=justify><b><font color=ff6600>My computer</font></b><br>Contents of your local machine.</p>','#ffffff','#000000');
messages[16] = new Array('../images/obk_spacer.gif','<p align=justify><b><font color=ff6600>My IBackup</font></b><br>Files and folders backed up to your account.</p>','#ffffff','#000000');
messages[17] = new Array('../images/obk_spacer.gif','<p align=justify><b><font color=ff6600>Default Backup set</font></b><br>Files and folders selected by you for backup to your account.</p>','#ffffff','#000000');
messages[18] = new Array('../images/obk_multinew_gui.jpg','<p align=justify><b><font color=ff6600>Multiple PC Backup</font></b><br>Backup data from multiple computers to a single IBackup account; prevents data overlap in case you are trying to backup files and folders with the same name from different machines.</p>','#ffffff','#000000');
messages[19] = new Array('../images/obk_searnew_gui.jpg','<p align=justify><b><font color=ff6600>Search</font></b><br>Quickly locate files and folders on your local computer.</p>','#ffffff','#000000');
messages[20] = new Array('../images/obk_refrnew_gui.jpg','<p align=justify><b><font color=ff6600>Refresh</font></b><br>Reflects updates made to files backed up to your account.</p>','#ffffff','#000000');


messages[21] = new Array('../images/obk_tooltip_edit.jpg','<p align=justify><b><font color=ff6600>Edit</font></b><br>Edit the selected backup job.</p>','#ffffff','#000000');
messages[22] = new Array('../images/obk_tooltip_new.jpg','<p align=justify><b><font color=ff6600>New</font></b><br>Schedule a new backup job for the selected Backup set.</p>','#ffffff','#000000');
messages[23] = new Array('../images/obk_tooltip_delete.jpg','<p align=justify><b><font color=ff6600>Delete</font></b><br>Delete the selected backup job.</p>','#ffffff','#000000');
messages[24] = new Array('../images/obk_tooltip_immed.jpg','<p align=justify><b><font color=ff6600>Immediate</font></b><br>Select a scheduled backup job and set it up for an immediate backup.</p>','#ffffff','#000000');
messages[25] = new Array('../images/obk_tooltip_stop.jpg','<p align=justify><b><font color=ff6600>Stop</font></b><br>Stop the backup job that is "In Progress".</p>','#ffffff','#000000');
messages[26] = new Array('../images/obk_tooltip_refresh.jpg','<p align=justify><b><font color=ff6600>Refresh</font></b><br>Refresh the scheduled job(s) list with the latest changes.</p>','#ffffff','#000000');

messages[27] = new Array('../images/obk_spacer.gif','<p align=justify><b><font color=ff6600>Schedule</font></b><br>Schedule your files and folders for daily/ monthly/ immediate backup.</p>','#ffffff','#000000');
messages[28] = new Array('../images/obk_spacer.gif','<p align=justify><b><font color=ff6600>Notification</font></b><br>Receive email notifications on the scheduled backup status.</p>','#ffffff','#000000');


if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = tooltip.style;
	if (ie4||ie5||ns5) {	
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;
var t1,t2;	
var tipOn = false;	
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}
function positionTip(evt) {
	if (!tipFollowMouse) {
		standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = mouseX-(tpWd+offX)+"px";
	else tipcss.left = mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = winHt-(tpHt+offY)+"px";
	else tipcss.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')