﻿var TextboxShadow = {
	initialize: function (textbox, shadowtext) {
		var elm = $('#' + textbox);

		elm.focus(function () {
			if (elm.val() == shadowtext) {
				elm.css({ color: '#6c6c6c' });
				elm.val('');
			} else {
				elm.css({ color: '#6c6c6c' });
			}
		});

		elm.blur(function () {
			if (elm.val() == '') {
				elm.css({ color: '#c9c9c9' });
				elm.val(shadowtext);
			} else {
				elm.css({ color: '#6c6c6c' });
			}
		});
	}
}

var ProTracking = {
	OpenPopup: function (url, name, dim, settings) {
		var winSettings = Object.extend({
			scrollbars: 'yes',
			status: 1,
			resizable: 1,
			toolbar: 'no'
		}, settings);
		var pos = {
			left: (screen.width) ? (screen.width - dim.width) / 2 : 0,
			top: (screen.height) ? (screen.height - dim.height) / 2 : 0
		};
		var features = 'height=' + dim.height + ',width=' + dim.width + ',top=' + pos.top + ',left=' + pos.left + ',scrollbars=' + winSettings.scrollbars + ',status=' + winSettings.status + ',resizable=' + winSettings.resizable + ',toolbar=' + winSettings.toolbar;
		return window.open(url, name, features);
	}
}
