/*----------------------------initial setup----------------------------------------------------------*/

window.onload=function(e) {
	popup();
	initRollovers();
}

/*---------------------------window popup setting-----------------------------------------------------*/

///------popup-
function popup() {
if (!document.getElementsByTagName) return false;
var links = document.getElementsByTagName("a");
	for (var i=0; i < links.length; i++) {
		if (links[i].className.match("popup-")) {
			links[i].onclick = function() {
			window.open(this.href,'new01', 'left=0,top=0,screenX=0,screenY=0,menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=570,height=650');
			return false;
			}
		}
	}
}


/*--------------------------@rollover image swap class="imgover" stand alone---------------------------*/
//@<img class="imgover"

function initRollovers() {
	if (!document.getElementById) return
	var preload = new Array();
	var source;
	var images = document.getElementsByTagName('img');
	for (var i = 0; i < images.length; i++) {		
	if (images[i].className == 'imgover') {
		var src = images[i].getAttribute('src');
		var type = src.substring(src.lastIndexOf('.'), src.length);
		var addsrc = src.replace(type, '-over'+type);
		images[i].setAttribute('addsrc', addsrc);
		preload[i] = new Image();
		preload[i].src = addsrc;			
		images[i].onmouseover = function() {
			source = this.getAttribute('src');
			this.setAttribute('src', this.getAttribute('addsrc'));
			}				
		images[i].onmouseout = function() {
			if (!source) source = this.getAttribute('src').replace('-over'+type, type);
			this.setAttribute('src', source);
			}
		}
	}
}

/*--------------------------@rollover image swap class="imgover" stand alone---------------------------*/


function reSize(){
hh = screen.availHeight;
resizeTo(860,hh);
}

/*--------------------------@param get from url---------------------------*/

function prmGet(){
var thiurl = location.href;
param = thiurl.split("?prm=");
if(param[1]){
	prm = param[1];
}else{
	prm = 0;
}
}
