﻿// v1.0
// Massivemind MIDAS - HTML JS Support
// Copyright 2007 Massivemind Sdn Bhd.  All rights reserved.
//<< function ajojt0w0(){
function ajojt0w0(){
	var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op, i;
	d = document;
	n = navigator;
	na = n.appVersion;
	nua = n.userAgent;
	win = ( na.indexOf( 'Win' ) != -1 );
	mac = ( na.indexOf( 'Mac' ) != -1 );
	lin = ( nua.indexOf( 'Linux' ) != -1 );
	if ( !d.layers ){
		dom = ( d.getElementById );
		op = ( nua.indexOf( 'Opera' ) != -1 );
		konq = ( nua.indexOf( 'Konqueror' ) != -1 );
		saf = ( nua.indexOf( 'Safari' ) != -1 );
		moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
		ie = ( d.all && !op );
		ie4 = ( ie && !dom );
		/*
		ie5x tests only for functionality. ( dom||ie5x ) would be default settings. 
		Opera will register true in this test if set to identify as IE 5
		*/
		ie5x = ( d.all && dom );
		ie5mac = ( mac && ie5x );
		ie5xwin = ( win && ie5x );
	}
	if ( ie5mac ) {
		return "ie5mac";
	} else if ( d.layers ){
		return "dLayers";
	} else if ( ie4 ){
		return "ie4";
	} else if ( moz ){
		return "moz";
	} else if (op){
		return "op";
	} else {
		return "unknown";
	}	
}
//>>
//<< function jphhw
function jphhw(vq9s){
	var wtminym = ajojt0w0();
	if (vq9s[wtminym] == true){
		return true;
	} else {
		return false;
	}
}
//>>
//<< function ws6m2it4
function ws6m2it4 (){
	var wtminym = ajojt0w0();
	if (wtminym == "op"){
		self.location.href = "unsupported.html";
	} else {
		var py46p9sl = vhs2uhk("k93lc2xw.html", 'mm_xplore', null, null, true);
		// ready=1;
		if (py46p9sl != false){
			self.location.href = "thankyou.html";
		}
	}
}
//>>
//<< function vhs2uhk
function vhs2uhk(x993r, koz, kz8, vkorcu3m, mu5d1v){
	if (kz8 == null){
		var xPost = 0;
		var kz8 = screen.availWidth;
	} else {
		var xPost = (screen.availWidth - kz8)/2;
	}
	if (vkorcu3m == null){
		var yPost = 0;
		var vkorcu3m = screen.availHeight;
	} else {
		var yPost = (screen.availHeight - vkorcu3m)/2;
	}
	if (koz == null){
		var koz = "mm_system";
	}
	var paramStr = "width=" + kz8 + ",height=" + vkorcu3m + ",dependent=0,directories=0,location=0,menubar=0, maximize=0, resizable=0,scrollbars=0, status=1, titlebar=1";
	var mywin = window.open(x993r,koz,paramStr);
	//if (mywin != null){
		if (xPost != 0 || yPost != 0){
		}
		// for older version of IE need to set these again.
		mywin.resizeTo(kz8, vkorcu3m);
		mywin.moveTo(xPost,yPost);
		mywin.focus();
	//}
	if (mu5d1v){
		if(mywin != null){
			return mywin;
		} else {
			return false;
		}
	}
}
//>>
//<< function getCookie
function getCookie(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1){
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
}
//>>
//<< function setCookie
function setCookie(c_name,value,expiredays) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays)
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
//>>
//<< function checkIfBeenFromJumpTo
function checkIfBeenFromJumpTo(from, to){
	beenTo = getCookie(from);
	if (beenTo!=null && beenTo!=""){
		window.location.replace(to);
	}
}
//>>
//<< function m7xfai8v
function m7xfai8v(i){
	if (ajojt0w0() != "moz"){
		var ywd = rky8();
		ywd.focus();
		ywd.SetVariable("z8r7n5bi:eezab", i);
	}
	pjt();
}
//>>
//<< function pjt
function pjt(){
	var lt8 = f1g9();
	var iebkk1zz = ysm();
	var fxon = rky8();
	fxon.width = lt8;
	fxon.height = iebkk1zz;
}
//>>
//<< function f1g9
function f1g9(){
	var lt8 = window.innerWidth;
	if (lt8 == null){
		var lt8 = document.documentElement.clientWidth;
		if (lt8 == null){
			var lt8 = document.body.clientWidth;
		}
	}
	return lt8;
}
//>>
//<< function ysm
function ysm(){
	var iebkk1zz = window.innerHeight;
	if (iebkk1zz == null){
		var iebkk1zz = document.documentElement.clientHeight;
		if (iebkk1zz == null){
			var iebkk1zz = document.body.clientHeight;
		}
	}
	return iebkk1zz;
}
//>>
//
//

