
// GET DOM REFERENCE
function get(id){
	return document.getElementById(id);
}



// TOGGLE VISIBILITY
function toggle( targetId ){
  if (document.getElementById){

  		target = document.getElementById( targetId );

  		if (target.style.display == "none"){
  			target.style.display = "";
		} else {
			target.style.display = "none";
		}
  	}
}




/*
Preload images script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

var myimages=new Array()
function preloadimages(){
//	alert(preloadimages.arguments.length);
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://mydomain.com/firstimage.gif","http://mydomain.com/secondimage.gif","http://mydomain.com/thirdimage.gif")





// OPEN WINDOW
function NewWindow(mypage, myname, w, h, scroll, resize, tool, statusBar) {
if(screen.width){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
}else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;	
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+', toolbar='+tool+', status='+statusBar+''
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// Usage: <a href="#" onclick="NewWindow('page.php','popup','430','280','yes','yes','no', 'no')">


