<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function moreChange(sid,isim,adet) {
	for(var i=1;i<(parseInt(adet)+1);i++) {
		document.getElementById(isim+i).src='img/'+isim+i+'_g.gif';
	}
	document.getElementById(isim+sid).src='img/'+isim+sid+'_b.gif';
	document.getElementById('sayiKutusu').innerHTML = sid;
	switch(isim) {
		case 'capa':
			var metinler = new Array();
			metinler[1] = '<div style="height: 82px;"><!-- bosluk --></div><strong>what we strive for?</strong><br><p>At Blue Mushroom Creative we believe that outstanding work, careful management and ethical practices will achieve success. We work creatively, collaboratively and to budget, and we always keep in mind the ultimate goal: to engage, motivate and inform.</p>';
			//metinler[2] = '<div style="height: 82px;"><!-- bosluk --></div><p>Defining the idea, identifiying the brand and finally creating the identity. Are the key  principals we go by in order to push the boundries of visual communication.</p>';
			metinler[3] = '<div style="height: 22px;"><!-- bosluk --></div><div style="width: 617px;"><div style="float: center;  letter-spacing: 1px;">Blue Mushroom Creative strives to assist organizations or individuals in this important area by specialising</div></div><div align="center"><img src="img/services_.gif" alt="" width="617" height="174" border="0"></div>';
			metinler[4] = '<div style="height: 19px;"><!-- bosluk --></div><div><img src="img/capabilities.gif" alt="" width="175" height="34" border="0"></div><div style="height: 19px;"><!-- bosluk --></div>Blue Mushroom is focused to achieve implement and achieve the best possible visual strategy for you. We are confident in all our ideas and will not be satisfied unless you are. From the start until the end of the project phase, we are totally committed and fulfill our tasks to the utmost requirement. Every client is unique and we strive to create the solution that is unique to you. Our aim with each project consists of the right branding, placement, aimed at the right audience, sufficient planning, successful management, precise mediums used and most importantly, ideas that grow.';
			document.getElementById('expertiseText').innerHTML = metinler[sid];
		break;
		case 'comp':
			var metinler = new Array();
			metinler[1] = '<div style="height: 29px;"><!-- bosluk --></div><div><img src="img/ideasthatgrow.gif" alt="" width="239" height="35" border="0"></div><br>Blue Mushroom is a creative design studio experienced; creating brand identity, packaging, print media and interactive designs for a wide range of cultural and corporate clients. Whether on screen, print, or in strategic brand development, successful solutions require a balance of innovation and pragmatism based on knowledge, experience, and the drive to do more. Blue Mushroom, strikes this balance in its foundation from which we operate.';
			metinler[2] = '<div style="float: left; width: 367px;"><img src="img/offices.gif" alt="" width="323" height="205" border="0" style=" left: -15px; position: relative;"><div style="height: 14px;"><!-- bosluk --></div><a href="contact.php" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\'usecf\',\'\',\'img/usecf_b.gif\',1);"><img src="img/usecf.gif" alt="" name="usecf" id="usecf" width="237" height="17" border="0" style=" left: -15px; position: relative;"></a></div><div style="float: right; width: 279px;"><img src="img/contactleft.gif" alt="" width="279" height="240" border="0" style=" left: +20px; position: relative;"></div>';
			metinler[3] = '<div style="height: 29px;"><!-- bosluk --></div><div><img src="img/executives.gif" alt="" width="158" height="35" border="0"></div><br>Salih Kucukaga (Chairman, Chief Creative Officer)<br>Kartal Bora (Chairman, Chief Executive Officer)<br>Ozcan Koden ( President, Worldwide Creative Director)';
			metinler[4] = '<div style="height: 29px;"><!-- bosluk --></div><div><img src="img/partners.gif" alt="" width="130" height="35" border="0"></div><br>Graf2<br>H2a';
			document.getElementById('expertiseText').innerHTML = metinler[sid];
		break;
		case 'more':
			document.getElementById("sampleImg").style.opacity = 0.2;
			document.getElementById("sampleImg").style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=20)';
			document.getElementById('loading').style.opacity = 0.5;
			document.getElementById('loading').style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=50)';
			document.getElementById('sampleImg').onload = fadeIn;
			document.getElementById('sampleImg').src = imajlar[sid];
		break;
	}
}

function restore(sid,isim) {
	if(document.getElementById('sayiKutusu').innerHTML!=sid) MM_swapImage(isim+sid,'','img/'+isim+sid+'_g.gif',1);
}
var s=0;

function fadeIn() {
	s = 20;
	loop = setInterval("fade()",20);
}

function fade() {
	s+=10;
	document.getElementById("sampleImg").style.opacity = s/100;
	document.getElementById("sampleImg").style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity='+s+')';
	document.getElementById('loading').style.opacity = (100-s)/200;
	document.getElementById('loading').style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity='+((100-s)/2)+')';
	if (s>=100){
		document.getElementById('loading').style.opacity = 0;
		document.getElementById('loading').style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)';
		window.clearInterval(loop);
	}
}

function chk(w) {
	if(w<1||w>2) return;
	document.getElementById('c'+w).checked = true;
	document.getElementById('chk1').src = 'img/unchecked.gif';
	document.getElementById('chk2').src = 'img/unchecked.gif';
	document.getElementById('chk'+w).src = 'img/checked.gif';
}

function retr(w) {
	document.getElementById('portDesTitle').innerHTML = jobs[w][0];
	document.getElementById('services').innerHTML = jobs[w][1];
	document.getElementById('objectives').innerHTML = jobs[w][2];
	document.getElementById('portDesFoot').innerHTML = (jobs[w][3]=='') ? '' : '<a href="cs/'+jobs[w][3]+'"><img src="img/viewCS_a.gif" alt="" width="86" height="22" border="0"></a>';
	if(jobs[w][4]!='') {
		document.getElementById('sayiKutusu').innerHTML = 1;
		var imgs = jobs[w][4].split('|');
		document.getElementById('portDesMore').innerHTML = '<img src="img/moresamp.gif" alt="" width="80" height="18" border="0">';
		imajlar = new Array();
		for(i=0;i<imgs.length;i++) {
			imajlar[i+1] = 'pimg/'+imgs[i];
			document.getElementById('portDesMore').innerHTML += '<a href="javascript:;" onClick="moreChange('+(i+1)+',\'more\','+imgs.length+'); return false;" onMouseOut="restore('+(i+1)+',\'more\');" onMouseOver="MM_swapImage(\'more'+(i+1)+'\',\'\',\'img/more'+(i+1)+'_b.gif\',1);"><img src="img/more'+(i+1)+'_g.gif" alt="" width="19" height="18" border="0" id="more'+(i+1)+'" name="more'+(i+1)+'"></a><img src="img/dot.gif" alt="" width="2" height="1" border="0">';
		}
		setTimeout('moreChange(1,\'more\','+imgs.length+');',20);
	}
	else {
		document.getElementById('sayiKutusu').innerHTML = 0;
		document.getElementById('portDesMore').innerHTML = '';
		document.getElementById('sampleImg').src = 'img/dot.gif';
	}
}

function fill() {
	for (var i in jobs)
	document.getElementById('portIsler').innerHTML += '<a href="javascript:;" onclick="retr('+i+');">'+jobs[i][0]+'</a><br>';
}

function validate(f) {
	var hata = 'There is/are problem(s) with your form. Please correct following issues;\n';
	if(f.city[0].checked == false && f.city[1].checked == false) hata = hata + '\nOffice not selected';
	if(f.name.value == '' || f.name.value == 'Name : ') hata = hata + '\n"Name" field is not filled';
	if(f.email.value == '' || f.email.value == 'E-mail : ') {
		hata = hata + '\n"E-mail" field is not filled';
	}
	else {
		if(isEmail(f.email.value)==false) hata = hata + '\nE-mail address is not valid.';
	}
	if(f.company.value == '' || f.company.value == 'Company : ') hata = hata + '\n"Company" field is not filled';
	if(f.message.value == '' || f.message.value == 'Your message : ') hata = hata + '\n"Your message" field is not filled';
	if(hata=='There is/are problem(s) with your form. Please correct following issues;\n') {
		return true;
	}
	else {
		alert(hata);
		return false;
	}
}
function isEmpty(str){
  return (str == null) || (str.length == 0);
}
function isEmail(str){
  if(isEmpty(str)) return false;
  var re = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i
  return re.test(str);
}
-->
