function RelativePath(FileName,protocol)
{
// protocol = 1 ise https 
// protocol = 0 ise http
// full url verilmeden (sadece dosya adı kullanılarak
// SSL protokolü ile normal protokol arasında geçiş
// yapmayı kolaylaştırır.
var mys=new String(document.location.host + document.location.pathname)
f=mys.length;
do
{
	mychar = mys.charAt(f);
	f=f-1;
}
while (mychar!='/') 
PathN = mys.substring(0,f+1);
if (protocol==1) prtstr='https://';
if (protocol==0) prtstr='http://';
document.location  = prtstr + PathN + '/' + FileName;
}
