function WOpenEnlargeOrg(alamat)
{
var win = null;
var w=850;
var h=550;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+', scrollbars=no,status=no,toolbar=no,menubar=yes'
win = window.open(alamat,"wnew1",settings)
win.focus();
}

function WOpenEnlargeImg(alamat)
{
var win = null;
var w=820;
var h=580;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+', scrollbars=no,status=no,toolbar=no,menubar=yes'
win = window.open(alamat,"wnew1",settings)
win.focus();
}

function del_iklan()
{
if (confirm("Are you sure want to delete these data?"))
document.form1.submit();

}
function del(num)
{
if (confirm("Are you sure want to delete these data?"))
if (num==2) document.form2.submit();
else document.form.submit()
}

function wopen(alamat,tinggi,lebar)
{ 
wnew1=window.open(alamat,"wnew1","resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,width="+lebar+",height="+tinggi+",Top=0,Left=0");
wnew1.focus();
}

function wset(alamat)
{ 
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
wset = window.open(alamat,"wsetx","resizable,scrollbars,width=300,height=300,screenX=50,screenY=350");
wset.focus();
}

var response = null 
function prompt2(promptpicture, prompttitle, message, sendto,params) { 
	promptbox = document.createElement('div style="z-index : 150 " '); 
	promptbox.setAttribute ('id' , 'prompt'); 
	document.getElementsByTagName('body')[0].appendChild(promptbox); 
	promptbox = eval("document.getElementById('prompt').style"); 
	promptbox.position = 'absolute'; 
	promptbox.top = 100 ;
	promptbox.left = 200 ;
	promptbox.width = 300 ;
	promptbox.border = 'outset 1 #bbbbbb' ;
	document.getElementById('prompt').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' width='100%'><tr valign='middle'><td width='22' height='22' style='text-indent:2;' class='titlebar'><img src='" + promptpicture + "' height='18' width='18'></td><td class='titlebar'>" + prompttitle + "</td></tr></table>" ;
	document.getElementById('prompt').innerHTML = document.getElementById('prompt').innerHTML + "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='promptbox'><tr><td>" + message + "</td></tr><tr><td><input type='text' id='promptbox' onblur='this.focus()' class='promptbox'></td></tr><tr><td align='right'><br><input type='button' class='prompt' value='OK' onMouseOver='this.style.border=\"1 outset #dddddd\"' onMouseOut='this.style.border=\"1 solid transparent\"' onClick='" + sendto + "(document.getElementById(\"promptbox\").value,\""+ params +"\"); document.getElementsByTagName(\"body\")[0].removeChild(document.getElementById(\"prompt\"))'> <input type='button' class='prompt' value='Cancel' onMouseOver='this.style.border=\"1 outset transparent\"' onMouseOut='this.style.border=\"1 solid transparent\"' onClick='" + sendto + "(\"\"); document.getElementsByTagName(\"body\")[0].removeChild(document.getElementById(\"prompt\"))'></td></tr></table>" ;
	document.getElementById("promptbox").focus() ;
	}

function today()
{
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000)
year+=1900;
var day=mydate.getDay();
var month=mydate.getMonth();
var daym=mydate.getDate();
if (daym<10)
   daym="0"+daym;
var dayarray=new Array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu");
var montharray=new Array("Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember");
document.write(dayarray[day]+", "+daym+" "+montharray[month]+"  "+year);
}


function NewWindow(mypage,myname,w,h,scroll){
var win = null;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
win.focus();
}

function GetEndCopyRigth(){
    today=new Date();
	document.write("<font color='#FFFFFF' face='Verdana' size=1>"+today.getFullYear()+"</font>");
}

function ShowIdentPeg(NIP){
window.opener.location='pegawai.asp?viewid=2&nip='+NIP+'&findcat=1';
window.opener.focus();
}

function MaxWindow(url){
var win = null;
win=window.open(url, "MaxWin", "resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=yes,screen.availWidth,screen.availHeight");
win.focus();
}

function PopWinPrint(url,w,h){
var win = null;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=yes'
win = window.open(url,"MaxWin",settings)
win.focus();
}
