var pagewidth=760;

function ww(s) { document.write(s); }

function wrdiv0(name,x1,y1,x2,y2,custom) {
var i,w,h,s;
	w=x2-x1; h=y2-y1;
	s='<div '; if(name!='') s+='id="'+name+'" ';
	s+='style="position:absolute; width:' +w+ 'px; height:' +h+ 'px; left:' +x1+ 'px; top:' +y1+ 'px;'+custom+'">';
	ww(s);
}

function wrdiv(name,x1,y1,x2,y2,custom) {
var i,w,h,s;
	w=x2-x1; h=y2-y1;
	i=(window.screen.availWidth-pagewidth-20)/2+x1;
	if(i<0) i=0;
	s='<div '; if(name!='') s+='id="'+name+'" ';
	s+='style="position:absolute; width:' +w+ 'px; height:' +h+ 'px; left:' +i+ 'px; top:' +y1+ 'px;'+custom+'">';
	ww(s);
}
function wrdivwh(name,x1,y1,w,h,custom) {
var i,s;
	i=(window.screen.availWidth-pagewidth-20)/2+x1;
	if(i<0) i=0;
	s='<div '; if(name!='') s+='id="'+name+'" ';
	s+='style="position:absolute; width:' +w+ 'px; height:' +h+ 'px; left:' +i+ 'px; top:' +y1+ 'px;'+custom+'">';
	ww(s);
}
function wrdivx() { ww('</div>'); }

function InsertFile(fn,h) {
	ww('<iframe scrolling=no marginwidth=0 marginheight=0 width=100% height='+h+' src="'+fn+'" frameborder=0></iframe>');
	}
function InsertFileWH(fn,w,h) {
	ww('<iframe scrolling=no marginwidth=0 marginheight=0 width='+w+' height='+h+' src="'+fn+'" frameborder=0></iframe>');
	}
function InsertIFrame0(w,h,src) {
	ww('<iframe id="doc0" allowtransparency="true" marginwidth=0 marginheight=0 width='+w+' height='+h+' frameborder=0 scrolling=no src="'+src+'"></iframe>');
	}
function InsertIFrame() {
	ww('<iframe name="doc1" id="doc1" marginwidth=0 marginheight=0 width=100% height=900 frameborder=0></iframe>');
	document.focus();
	}
function InsertIFrame0() {
	ww('<iframe name="doc0" id="doc0" marginwidth=0 marginheight=0 width=100% frameborder=0></iframe>');
	}
function SetDoc0(s,h) {
	document.all.doc0.src=s;
	//alert(document.all.doc0.document.body.scrollHeight);
	document.all('doc0').height=h;
	return(false);
}
function SetDoc1(s) {
	document.all.doc1.src=s;
	return(false);
}
function InsertIFrame3(w,h) {
	ww('<iframe name="doc3" id="doc3" allowtransparency="true" marginwidth=0 marginheight=0 width='+w+' height='+h+' frameborder=0>haha</iframe>');
	}
function InsertIFrame2(h) {
	ww('<iframe name="doc2" id="doc2" marginwidth=0 marginheight=0 width=100% height='+h+' frameborder=0></iframe>');
	}
function SetDoc2(s) {
	document.all.doc2.src=s;
	return(false);
}

