<!--
var w = window, d= document;
var curTxt = 0;
var fadeStay = 2000; // milliseconds
var Texts =new Array(), Titles = new Array();

w.onload = function(){
	d.isLoaded = true;
	b = (d.compatMode && d.compatMode != "BackCompat")? d.documentElement : d.body? d.body : null;
	w.defaultStatus = '';
	if(typeof(onLoadHandler) == 'function')onLoadHandler();
};/* Execute on document load */
function init(){
	Fader.Init();
	Texts = events;
	fade();
}
function fade(){
	Fader.fadeOverOut(curTxt);
	curTxt = (curTxt +1)%Texts.length;
	setTimeout("fade()", 3500);
}
function getFaderText(text){
	return Texts[text];
}
function getObject(id, pNode){
	Obj = null;
	if(isObj(id))Obj = id;
	else{
		if(!isObj(pNode))pNode=w.d;
		if(pNode.getElementById)Obj = pNode.getElementById(id);
		else if(pNode.all)Obj = pNode.all[id];
		else if(pNode.layers){
			Obj = getLayer(id, pNode);
		}else if(d.forms){
			for(var i=0; i<d.forms.length; i++)if(d.forms[i][id])Obj = d.forms[i][id];
		}
	}
	if(Obj && !Obj.style)Obj.style = Obj;
	return Obj;
}
function getLayer(id, pNode){
	for(i=0; i<pNode.d.layers.length; i++){
		cLayer = pNode.d.layers[i];
		if(cLayer.id == id)return cLayer;
		if(cLayer.d.layers.length)layer = getLayer(id, cLayer);
		if(layer)return layer;
	}
	return null;
}
function setContent(el, c){
	if(!(el=getObject(el)))return false;
	if(d.getElementById){el.innerHTML = '';el.innerHTML = c;}
	else if(d.all)el.innerHTML = c;
	else if(d.layers){c1 = '<p class='+id+'>'+c+'</p>';el.d.open();el.d.write(c1);el.d.close();}
}
function setProperty(el, p, v){
	if(!(el = getObject(el)))return false;
	eval('el.'+p+' = "'+v+'"');
}
function setCookie(n, v, e, p){
	d.cookie = n+'='+escape(v)+((!e)?'':('; expires='+e.toGMTString()))+'; path='+((!p)?'/':p);
}
function getCookie(n){
v = null, n = n + '=';
	if(d.cookie.length > 0){
		sPos = d.cookie.indexOf(n);
		if(sPos != -1){
			sPos += n.length;
			ePos = d.cookie.indexOf(';', sPos);
			if(ePos == -1)ePos = d.cookie.length;
			v = unescape(d.cookie.substring(sPos, ePos));
		}
	}
	return v;
}

function popUp(url, id, width, height, scroll, resize){
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	winProp = 'width='+width+',height='+height+',left='+left+',top='+top+',scrollbars='+scroll+',resizable='+resize+'';
	win = w.open(url, id, winProp);
	win.window.focus();
}
function isFun(funX){return (typeof(funX) == 'function');}
function isObj(objX){return typeof(objX) == 'object';}
function Int2Hex(v){v=v.toString(16);return (v.length==1)?'0'+v:v;}
function Hex2Int(v){return parseInt(v,16);}
function go(url, target){
	if(!target)target = self;
	if(url.substring(0, 4) != 'http')url = homePage()+url;
	target.location.replace(url);
	return true;
}
function homePage(){
	home = location.hostname;
	if(home.substring(0, 4) != 'http')home = 'http://'+home+'/';
	return home;
}
function goBack(){
	if(history.length > 1)history.go(-1);
	else goHome();
	return false;
}
function uploadPreview(){
	cont = getObject('prevContainer');
	File = document.frmUpload.uploadedFile.value;
	fileName = File.split('\\');
	fileExt = fileName[fileName.length - 1].split('.');
	fileExt = fileExt[fileExt.length - 1];
	if(!File || (fileExt != 'jpg' && fileExt != 'jpeg' && fileExt != 'gif' && fileExt != 'png')){
		if(fileExt != 'zip')alert('Invalid Filetype.');
		cont.style.display = 'none';
		return false;
	}
	prevSize1 = new Image();
	prevSize1.src = File;
	setTimeout('showPreview()', 250);
}
function showPreview(file){
	cont = getObject('prevContainer');
	a = unescape(prevSize1.src);
	document.images['prevSize'].src = prevSize1.src;
	imgSize = getProportionateImgSize(prevSize1, 500, 350);
	width  = prevSize1.width;
	height = prevSize1.height;
	size= (Math.round(document.images['prevSize'].fileSize * 10 / 1024))/10;
	cont.style.display = '';
	s = '<table cellpadding="0" cellspacing="10" style="background:#FFFFFF;border:1px #D6D6D6 solid;">';
	s += '<tr><td colspan="3"><center><img src="'+prevSize1.src+'" width="'+imgSize[0]+'" height="'+imgSize[1]+'"></center></td></tr>';
	s += '<tr><td><center>Size: '+size+' KB</center></td><td><center>Width : '+width+' Px</center></td><td><center>Height:'+height+' Px</center></td></tr></table>';

	cont.innerHTML = s;
}
function getProportionateImgSize(img, width, height){
	imgSize = Array(img.width, img.height);
	pcWidth = width / imgSize[0];
	pcHeight = height / imgSize[1];
	pc = (pcWidth < pcHeight) ? pcWidth : pcHeight;
	imgSize[0] = Math.round(imgSize[0] * pc);
	imgSize[1] = Math.round(imgSize[1] * pc);
	return imgSize;
}

//-->