// Global namespace for TP
if (!TP) {
	var TP = {};
}

// The TP Remote Login object
if (!TP.RemoteLogin) {
	TP.RemoteLogin = {};
}

TP.RemoteLogin = {


	
	
	// Remote Login stylesheet
	css:		'<style type="text/css">' +
				'#tutorpanel-remote-login form#login-tutorpanel {font-family:Arial, Helvetica, Verdana, sans-serif; font-size:13px; color:#5a6a7f; background:#EDECE7; margin:0; padding:5px 20px 20px; width:200px; border:1px solid #bbb;}' +
				'#tutorpanel-remote-login form#login-tutorpanel fieldset {background:transparent; margin:0; padding:5px 0 0 0; border:0;}' +
				'#tutorpanel-remote-login form#login-tutorpanel h3 {height:27px;}' +
				'#tutorpanel-remote-login form#login-tutorpanel h3 a {display:block; background:url(http://tutorpanel.com/home-images/remote-logo.png) no-repeat; text-indent:-9999em; margin:0 auto; width:200px; height:45px;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .reset-password {float:right; color:#3b82e7; text-decoration:none;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .reset-password:hover {text-decoration:underline;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .field {margin:10px 0;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .bottom-field {margin:17px 0;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .field label {display:block; margin:0 0 5px;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .field input.text {font-size:15px; padding:2px 0; width:100%}' +
				'#tutorpanel-remote-login form#login-tutorpanel .field input.submit {display:block; float:left; color:#fff; font-size:12px; background:#245B8E; padding:5px 10px 7px; border:1px solid #fff;}' +
				'#tutorpanel-remote-login form#login-tutorpanel .field input.submit:hover {cursor:pointer;}' +
				'</style>',
		
				


	// Remote Login form template
	template: 	'<div id="tutorpanel-remote-login">' +
				'<form id="login-tutorpanel" method="post" action="https://www.tutorpanel.com/login.php" target="_top">' +
				'<fieldset>' +
				'<div class="field"><label for="Username">Username</label><input type="text" name="username" id="username" class="text"/></div>' +
				'<div class="field"><label for="Password">Password</label><input type="password" name="password" id="password" class="text" /></div>' +
				'<div class="field bottom-field"><input type="submit" value="Login" class="submit" /></div>' +
				'<input type="hidden" name="submitted" value="true"/>' +
				'<a href="http://www.tutorpanel.com/reset" target="_top" class="reset-password">Forgot your password?</a>' +
				'</fieldset>' +
				'</form>' +
				'</div>',

	// Initializes and installs remote login form
	init: function(){
		return (this.css) + this.template;
	}

};

(function(){
	document.write(TP.RemoteLogin.init(TP.RemoteLogin));
})();

