// Opens small popup
shown=''
function OpenFile(url) {
if( shown=='' || shown.closed) {
	shown=window.open(url,'OpenFile','scrollbars=no,status=no, high,width=350,height=300');
}
else{ 
	shown.close();
	shown=window.open(url,'OpenFile','scrollbars=no,status=no, high,width=350,height=300');
}
}

function clickclose ()
{
close();
}

//opens a new window
function OpenInNewWindow(url,width,height)
{
	today = new Date()
	return window.open(url,"viewdetails"+today.getMilliseconds(),"width="+width+",height="+height+",left=12,top=12,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
}

function OpenInNewWindowReturnFalse(url)
{
    width=770
    height=450
	today = new Date()
	window.open(url,"viewdetails"+today.getMilliseconds(),"width="+width+",height="+height+",left=12,top=12,menubar=yes,status=yes,scrollbars=yes,resizable=yes")
	return false
}



//opens pop=up window
	function popup_window(url, id, width, height){
		popup = window.open(url, id, 'toolbar=no, scrollbars=no, location=no, statusbar=no, menubar=no, resizable=no, width=' + width + ', height=' + height + '');
		popup.focus();
	}


//TAB functions
var shown = '';
var olfid = '1';

function win(url) {
	if(shown == '' || shown.closed) {
		shown = window.open(url,'win','scrollbars=no,status=no, high,width=550,height=320');
	} else {
		shown.close();
		shown = window.open(url,'win','scrollbars=no,status=no, high,width=550,height=320');
	}
}

function open_builder() {
	new__window=window.open ("http://sitestudio.demo.psoft.net:8081/demo","_blank", "width=860,height=540,resizable=1,scrollbars=1");
}

function fswitch(fid) {

	if(olfid != '') {
		if(olfid == '1') {
			document.getElementById('fid_' + olfid).className = 'dis tl';
		} else if(olfid == '14') {
			document.getElementById('fid_' + (olfid -1)).className = 'dis';
			document.getElementById('fid_' + olfid).className = 'dis bl';
		} else {
			if(olfid > 2) {
				document.getElementById('fid_' + (olfid -1)).className = 'dis';
			} else {
				document.getElementById('fid_' + (olfid -1)).className = 'dis tl';
			}
			document.getElementById('fid_' + olfid).className = 'dis';
		}
	}

	if(fid == '1') {
		document.getElementById('fid_' + fid).className = 'highlighted hightl';
	} else if(fid == '14') {
		document.getElementById('fid_' + fid).className = 'highlighted bl';
	} else {
		document.getElementById('fid_' + fid).className = 'highlighted';
	}
	
	if(fid > 2) {
		document.getElementById('fid_' + (fid -1)).className = 'dis highbot';
	} else if(fid == 2) {
		document.getElementById('fid_' + (fid -1)).className = 'dis highbot tl';
	}
	document.getElementById('display').innerHTML = document.getElementById('bid_' + fid).innerHTML;
	olfid = fid;
}

function loadFeatures() {
	document.getElementById('display').innerHTML = document.getElementById('bid_1').innerHTML;
}


//Preload Images
var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}


//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
preloadimages("http://www.indichosts.net/images/footer.jpg","http://www.indichosts.net/images/bg03.jpg","http://www.indichosts.net/images/bg02.jpg","http://www.indichosts.net/images/bg1223.jpg","http://www.indichosts.net/images/bg1222.jpg")

