
baseHREF = 'http://www.ausmigrate.com.au/';
if (location.href.indexOf('file://') != -1) baseHREF = location.href.substring(0,location.href.indexOf('public_html/') + 12);

if (document.images) {
	IM = new Array();
	OM = new Array();
	for (i = 1; i <= 8; i++) {
		IM[i] = new Image(); IM[i].src = baseHREF+'images/m' + i + 'a.gif';
		OM[i] = new Image(); OM[i].src = baseHREF+'images/m' + i + '.gif';
	}
}
function MI(n) { if (document.images) document.images['M' + n].src = IM[n].src; }
function MO(n) { if (document.images) document.images['M' + n].src = OM[n].src; }

var img = new Array;
img[0] = "images/main.jpg";
img[1] = "images/main.jpg";
img[2] = "images/main.jpg";
img[3] = "images/main.jpg";
img[4] = "images/main.jpg";

function random_img(){
        var i = myrandom(img.length) - 1;
        document.write("<IMG SRC=\"" + img[i] + "\" width=760 height=326>");

}
function myrandom(max){
        var v = max * Math.random();
        if(v == 0.0){v = 1;}else{v = Math.ceil(v);}
        return v;
}


pmStr = new Array(); pmUrl = new Array();
url = baseHREF+'faq/images/b' + i + '.gif';

pmStr[2] = new Array('Temporary Residence FAQ','Family Stream FAQ','Business Visas FAQ','General Skilled Migration Visa FAQ','Student Visa FAQ');
pmUrl[2] = new Array(baseHREF+'faq/01.htm',baseHREF+'faq/02.htm',baseHREF+'faq/03.htm',baseHREF+'faq/04.htm',baseHREF+'faq/05.htm');

pmStr[3] = new Array('Temporary Residence FAQ','Family Stream FAQ','Business Visas FAQ','General Skilled Migration Visa FAQ','Student Visa FAQ');
pmUrl[3] = new Array(baseHREF+'faq/01.htm',baseHREF+'faq/02.htm',baseHREF+'faq/03.htm',baseHREF+'faq/04.htm',baseHREF+'faq/05.htm');

pmDisp = '';
function pm(n) {
	s = 'popupMenu' + n;
	if (pmDisp != s && pmDisp) {
		clearTimeout(TO);
		PMO(pmDisp.substring(9));
	}
	pmDisp = s;
	pmd = eval(pmDisp);
	pmd.innerHTML = '';
	var s = '<TABLE WIDTH=95 BORDER=0 CELLSPACING=0 CELLPADDING=4 BGCOLOR=#E1EDED STYLE="border:solid 1px white;">';
	for (i = 0; i < pmStr[n].length; i++) {
		s += '<TR>' + '<TD STYLE="';
		s += 'font-size:10px; color:#666666; border-bottom:solid 1px #FFFFFF" ';
		s += 'onMouseOver="PMTDI(this, \'' + n + '\', ' + i + ',i)" ';
		s += 'onMouseOut="PMTDO(this, \'' + n + '\', ' + i + ',i)" ';
		s += 'onClick="location.href=\'' + pmUrl[n][i] + '\'; PMO(\'' + n + '\')">';
		s += '&nbsp;' + pmStr[n][i] + '&nbsp;';
		s += '</TD></TR>';
	}
	s += '<TR><TD><IMG SRC="' + baseHREF + 'images/sp.gif" WIDTH=2 HEIGHT=2 ALT=""></TD></TR>';
	s += '</TABLE>\n';
	pmd.innerHTML = s;
	pmd.style.visibility = 'visible';
	return false;
}
TO = 0;
function PMI(n) {
	s = 'popupMenu' + n;
	if (pmDisp == s) clearTimeout(TO);
	eval(s).style.visibility = 'visible';
}
function PMO(n) {
	TO = setTimeout('popupMenu' + n + '.style.visibility = "hidden"', 100);
}
function PMTDI(obj, p, d, n) {
	obj.style.color = '#FFFFFF';
	obj.style.backgroundColor = '#65A2A2';
	obj.style.cursor = 'hand';
	if (document.images['pmi' + p + '_' + d]) document.images['pmi' + p + '_' + d].src = pmArrow[1].src
}

function PMTDO(obj, p, d, n) {
	obj.style.color = '#666666';	
	obj.style.backgroundColor = '#E1EDED';
	obj.style.cursor = 'auto';
	if (document.images['pmi' + p + '_' + d]) document.images['pmi' + p + '_' + d].src = pmArrow[0].src
}


